13

纯小白用 vue3+vite 写项目打包遇到了问题

 2 years ago
source link: https://www.v2ex.com/t/816652
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

vite build打包时出出现了报错,因为我也不不是很会前端所以想问下有没有大牛指点一下

报错如下:

[rollup-plugin-dynamic-import-variables] Unexpected token (321:13)
file: xxxxxxxxxx/index.vue:321:13
error during build:
SyntaxError: Unexpected token (321:13)
    at Parser.pp$4.raise (xxxxxxxxxx\node_modules\rollup\dist\shared\rollup.js:16958:13)
    at Parser.pp.unexpected (xxxxxxxxxx\node_modules\rollup\dist\shared\rollup.js:14466:8)
    at Parser.pp$3.parseExprAtom (xxxxxxxxxx\node_modules\rollup\dist\shared\rollup.js:16335:10)
    at Parser.pp$3.parseExprSubscripts (xxxxxxxxxx\node_modules\rollup\dist\shared\rollup.js:16130:19)
    at Parser.pp$3.parseMaybeUnary (xxxxxxxxxx\node_modules\rollup\dist\shared\rollup.js:16096:17)
    at Parser.pp$3.parseExprOps (xxxxxxxxxx\node_modules\rollup\dist\shared\rollup.js:16029:19)
    at Parser.pp$3.parseMaybeConditional (xxxxxxxxxx\node_modules\rollup\dist\shared\rollup.js:16012:19)
    at Parser.pp$3.parseMaybeAssign (xxxxxxxxxx\node_modules\rollup\dist\shared\rollup.js:15980:19)
    at Parser.pp$3.parsePropertyValue (xxxxxxxxxx\node_modules\rollup\dist\shared\rollup.js:16639:87)
    at Parser.pp$3.parseProperty (xxxxxxxxxx\node_modules\rollup\dist\shared\rollup.js:16630:8)

去看了下这个文件,是一个样式比较复杂的页面,321:13 是 css 的某一行。

也去搜了一下发现也有人遇到过这个问题但是最后还是没搞明白是怎么解决。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK