Skip to content

Commit

Permalink
Replace rollup-swc-preserve-directives with rollup-preserve-directives (
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi authored Dec 2, 2023
1 parent de7b1d7 commit f36ca36
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"rollup": "^3.28.1",
"rollup-plugin-dts": "^6.0.1",
"rollup-plugin-swc3": "^0.10.3",
"rollup-swc-preserve-directives": "^0.7.0",
"rollup-preserve-directives": "^1.0.0",
"tslib": "^2.5.0"
},
"peerDependencies": {
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/build-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { nodeResolve } from '@rollup/plugin-node-resolve'
import replace from '@rollup/plugin-replace'
import { sizeCollector } from './plugins/size-plugin'
import { inlineCss } from './plugins/inline-css'
import swcPreserveDirectivePlugin from 'rollup-swc-preserve-directives'
import preserveDirectives from 'rollup-preserve-directives'
import {
getTypings,
getExportPaths,
Expand Down Expand Up @@ -172,7 +172,7 @@ async function buildInputConfig(
: [
...commonPlugins,
inlineCss({ exclude: /node_modules/ }),
swcPreserveDirectivePlugin(),
preserveDirectives(),
replace({
values: getBuildEnv(options.env || []),
preventAssignment: true,
Expand Down

0 comments on commit f36ca36

Please sign in to comment.