We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
想给项目装上 eslint,在开启了 dot-notaion 下发现了一个编译上的问题。
原代码(electron/main/index) const url = `http://${process.env['VITE_DEV_SERVER_HOST']}:${process.env['VITE_DEV_SERVER_PORT']}`
const url = `http://${process.env['VITE_DEV_SERVER_HOST']}:${process.env['VITE_DEV_SERVER_PORT']}`
修改为 const url = `http://${process.env.VITE_DEV_SERVER_HOST}:${process.env.VITE_DEV_SERVER_PORT}`
const url = `http://${process.env.VITE_DEV_SERVER_HOST}:${process.env.VITE_DEV_SERVER_PORT}`
编译过后(dist/electron/main/index)变成了 const url = `http://${{}.VITE_DEV_SERVER_HOST}:${{}.VITE_DEV_SERVER_PORT}`;
const url = `http://${{}.VITE_DEV_SERVER_HOST}:${{}.VITE_DEV_SERVER_PORT}`;
关于这块有什么解决办法吗,目前处理是关闭了 dot-notaion 保持原先 a['value'] 这类写法
The text was updated successfully, but these errors were encountered:
This behavior is caused by the vite:define plugin inside Vite. A PR on this issue is currently under discussion. vitejs/vite#8843
vite:define
这个行为是由于 Vite 内部的 vite:define 插件引起的。关于这个问题的 PR 目前正在讨论中
Sorry, something went wrong.
No branches or pull requests
想给项目装上 eslint,在开启了 dot-notaion 下发现了一个编译上的问题。
原代码(electron/main/index)
const url = `http://${process.env['VITE_DEV_SERVER_HOST']}:${process.env['VITE_DEV_SERVER_PORT']}`
修改为
const url = `http://${process.env.VITE_DEV_SERVER_HOST}:${process.env.VITE_DEV_SERVER_PORT}`
编译过后(dist/electron/main/index)变成了
const url = `http://${{}.VITE_DEV_SERVER_HOST}:${{}.VITE_DEV_SERVER_PORT}`;
关于这块有什么解决办法吗,目前处理是关闭了 dot-notaion 保持原先 a['value'] 这类写法
The text was updated successfully, but these errors were encountered: