Skip to content

Commit

Permalink
chore(build): fix cdn process error (#16870)
Browse files Browse the repository at this point in the history
* chore: fix cdn process error

* chore: add deps @rollup/plugin-replace
  • Loading branch information
warmthsea committed May 15, 2024
1 parent 1ecdafb commit 4e0bed0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
1 change: 1 addition & 0 deletions internal/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@pnpm/logger": "^4.0.0",
"@rollup/plugin-commonjs": "^22.0.1",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^5.0.5",
"@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"chalk": "^5.0.1",
Expand Down
4 changes: 4 additions & 0 deletions internal/build/src/tasks/full-bundle.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import path from 'path'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import { rollup } from 'rollup'
import replace from '@rollup/plugin-replace'
import commonjs from '@rollup/plugin-commonjs'
import vue from '@vitejs/plugin-vue'
import VueMacros from 'unplugin-vue-macros/rollup'
Expand Down Expand Up @@ -59,6 +60,9 @@ async function buildFullEntry(minify: boolean) {
treeShaking: true,
legalComments: 'eof',
}),
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
]
if (minify) {
plugins.push(
Expand Down
30 changes: 23 additions & 7 deletions pnpm-lock.yaml

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

0 comments on commit 4e0bed0

Please sign in to comment.