运行 npm run dev 出现如下错误:
1 | dev |
在网上一直搜 SyntaxError: Unexpected token 'export' 的解决办法,最终发现 Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. 这句才是重点,在 package.json 中添加:
1 | { |
运行 npm run dev 出现如下错误:
1 | dev |
在网上一直搜 SyntaxError: Unexpected token 'export' 的解决办法,最终发现 Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. 这句才是重点,在 package.json 中添加:
1 | { |