Closed bianyuanop closed 7 months ago
Can you provide minimum reproducibility not the entire app
vite.config.ts
define: { "process.env": process.env, // "global": "window" }
Try removing "global": "window"
vite.config.ts
define: { "process.env": process.env, // "global": "window" }
Try removing "global": "window"
Yea, it compiles now. Is the "global" keyword already occupied by NaiveUI? I think in some use cases, we still need to export window variable.
This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem
TuSimple/naive-ui version (版本)
2.34.4
Vue version (Vue 版本)
3.2.47
Browser and its version (浏览器及其版本)
Chrome(112.0.5615.49)
System and its version (系统及其版本)
Ubuntu 22.04
Node version (Node 版本)
v18.15.0
Reappearance link (重现链接)
https://github.com/bianyuanop/epay_frontend
Reappearance steps (重现步骤)
npm install npm run build
Expected results (期望的结果)
Expected to build normally
Actual results (实际的结果)
error during build: RollupError: Could not resolve "./window-style" from "node_modules/naive-ui/es/components.js"
Remarks (补充说明)