–>
Rollup failed to resolve import “element-plus/es/components” from “node_modules/element-plus/es/index.js”.
今天打包的時(shí)候出現(xiàn)了錯(cuò)誤
Rollup failed to resolve import "element-plus/es/components" from "node_modules/element-plus/es/index.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
暫不知道出現(xiàn)的原因和原理文章來源:http://www.zghlxwxcb.cn/news/detail-519242.html
解決方法,在vite.config中添加build文章來源地址http://www.zghlxwxcb.cn/news/detail-519242.html
build: {
rollupOptions: {
external: [
"element-plus",
],
},
},
到了這里,關(guān)于Rollup failed to resolve import “element-plus/es/components“ from “node_modules/element-plus/es/inde的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!