vite和antd错误 - > [VITE:CSS]未启用内联JavaScript。您的选项是否设置?
我不确定如何解决从CRA迁移到Vite的错误。
> vite build
vite v2.9.13 building for production...
✓ 3811 modules transformed.
[vite:css] Inline JavaScript is not enabled. Is it set in your options?
file: /Users/nikos/WebstormProjects/web/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/antd/es/date-picker/style/index.less:110:0
error during build:
Error: Inline JavaScript is not enabled. Is it set in your options?
at less (/Users/nikos/WebstormProjects/web/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-80fe9c6b.js:38106:33)
at async compileCSS (/Users/nikos/WebstormProjects/...
如果我将其添加到vite config,
less: {
javascriptEnabled: true,
},
它将更改为
文件:/USERS/nikos/webstormprojects/web/node_modules/.pnpm/< data-cfemail =“ 0f617b6b4f3b213d3e213b”> [email&nbsp; pretanced] [email&nbsp; prectioned] [email&nbsp; procearted] /node_modules/antd/antd/antd/es/tag/tag/style/style/index.less:110:0:0
其中包含:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将其添加到您的Vite配置
Add this to your vite config