chore(build): fix cdn process error (#16870)

* chore: fix cdn process error

* chore: add deps @rollup/plugin-replace
This commit is contained in:
sea / 神秘海
2024-05-15 19:01:34 +08:00
committed by GitHub
parent 1ecdafb2af
commit 4e0bed01e5
3 changed files with 28 additions and 7 deletions

View File

@@ -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",

View File

@@ -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'
@@ -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(

30
pnpm-lock.yaml generated
View File

@@ -361,6 +361,9 @@ importers:
'@rollup/plugin-node-resolve':
specifier: ^13.3.0
version: 13.3.0(rollup@2.75.7)
'@rollup/plugin-replace':
specifier: ^5.0.5
version: 5.0.5(rollup@2.75.7)
'@vitejs/plugin-vue':
specifier: ^2.3.3
version: 2.3.3(vite@2.9.15)(vue@3.2.37)
@@ -3746,6 +3749,20 @@ packages:
rollup: 2.75.6
dev: true
/@rollup/plugin-replace@5.0.5(rollup@2.75.7):
resolution: {integrity: sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==}
engines: {node: '>=14.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
peerDependenciesMeta:
rollup:
optional: true
dependencies:
'@rollup/pluginutils': 5.1.0(rollup@2.75.7)
magic-string: 0.30.8
rollup: 2.75.7
dev: false
/@rollup/pluginutils@3.1.0(rollup@2.75.6):
resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==}
engines: {node: '>= 8.0.0'}
@@ -3789,7 +3806,7 @@ packages:
estree-walker: 2.0.2
picomatch: 2.3.1
/@rollup/pluginutils@5.1.0:
/@rollup/pluginutils@5.1.0(rollup@2.75.7):
resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==}
engines: {node: '>=14.0.0'}
peerDependencies:
@@ -3801,7 +3818,7 @@ packages:
'@types/estree': 1.0.5
estree-walker: 2.0.2
picomatch: 2.3.1
dev: true
rollup: 2.75.7
/@rollup/rollup-android-arm-eabi@4.13.0:
resolution: {integrity: sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==}
@@ -3969,7 +3986,6 @@ packages:
/@types/estree@1.0.5:
resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
dev: true
/@types/expect@1.20.4:
resolution: {integrity: sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==}
@@ -4654,7 +4670,7 @@ packages:
optional: true
dependencies:
'@babel/types': 7.24.0
'@rollup/pluginutils': 5.1.0
'@rollup/pluginutils': 5.1.0(rollup@2.75.7)
'@vue/compiler-sfc': 3.4.21
ast-kit: 0.11.3
local-pkg: 0.5.0
@@ -5745,7 +5761,7 @@ packages:
engines: {node: '>=16.14.0'}
dependencies:
'@babel/parser': 7.24.1
'@rollup/pluginutils': 5.1.0
'@rollup/pluginutils': 5.1.0(rollup@2.75.7)
pathe: 1.1.2
transitivePeerDependencies:
- rollup
@@ -5756,7 +5772,7 @@ packages:
engines: {node: '>=16.14.0'}
dependencies:
'@babel/parser': 7.24.1
'@rollup/pluginutils': 5.1.0
'@rollup/pluginutils': 5.1.0(rollup@2.75.7)
pathe: 1.1.2
transitivePeerDependencies:
- rollup
@@ -10541,7 +10557,6 @@ packages:
engines: {node: '>=12'}
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
dev: true
/magicast@0.3.4:
resolution: {integrity: sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==}
@@ -15060,6 +15075,7 @@ packages:
/workbox-google-analytics@6.6.0:
resolution: {integrity: sha512-p4DJa6OldXWd6M9zRl0H6vB9lkrmqYFkRQ2xEiNdBFp9U0LhsGO7hsBscVEyH9H2/3eZZt8c97NB2FD9U2NJ+Q==}
deprecated: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
dependencies:
workbox-background-sync: 6.6.0
workbox-core: 6.6.0