build(deps): 添加 tslib 作为外部依赖并进行内联处理- 在 nuxt.config.js 中配置 nitro 外部依赖和 build 转译
- 在 package.json 中添加 tslib 为项目依赖
This commit is contained in:
parent
ee85aced9e
commit
06b683557a
@ -91,7 +91,15 @@ export default defineNuxtConfig({
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
nitro: {
|
||||||
|
externals: {
|
||||||
|
inline: ['tslib'] // 将 tslib 内联到构建中
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
build: {
|
||||||
|
transpile: ['tslib'] // 确保 tslib 被正确转译
|
||||||
|
},
|
||||||
vite: {
|
vite: {
|
||||||
build: {
|
build: {
|
||||||
target: 'esnext',
|
target: 'esnext',
|
||||||
|
@ -34,7 +34,8 @@
|
|||||||
"segmentit": "^2.0.3",
|
"segmentit": "^2.0.3",
|
||||||
"vconsole": "^3.15.1",
|
"vconsole": "^3.15.1",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-router": "^4.5.0"
|
"vue-router": "^4.5.0",
|
||||||
|
"tslib": "^2.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@iconify-json/carbon": "^1.2.5",
|
"@iconify-json/carbon": "^1.2.5",
|
||||||
|
Loading…
Reference in New Issue
Block a user