You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
17: var __DEV__ = process.env.NODE_ENV !== 'production';
error during build:
SyntaxError: Unexpected keyword 'false' (15:4) in /Users/jony/projects/vue3-proj/node_modules/warning/warning.js
at Parser.pp$5.raise (/Users/jony/projects/vue3-proj/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:19495:13)
at Parser.pp$4.checkUnreserved (/Users/jony/projects/vue3-proj/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:19395:12)
at Parser.pp$4.parseIdent (/Users/jony/projects/vue3-proj/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:19431:10)
at Parser.pp$2.parseBindingAtom (/Users/jony/projects/vue3-proj/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:18057:15)
at Parser.pp$1.parseVarId (/Users/jony/projects/vue3-proj/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:17378:18)
at Parser.pp$1.parseVar (/Users/jony/projects/vue3-proj/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:17361:10)
at Parser.pp$1.parseVarStatement (/Users/jony/projects/vue3-proj/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:17227:8)
at Parser.pp$1.parseStatement (/Users/jony/projects/vue3-proj/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:16975:17)
at Parser.pp$1.parseTopLevel (/Users/jony/projects/vue3-proj/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:16877:21)
at Parser.parse (/Users/jony/projects/vue3-proj/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:16658:15)
error Command failed with exit code 1.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Perhaps Vite could implement the same preventAssignment feature as @rollup/plugin-replace too. Currently, it uses its own plugin, which does simple replacements.
Describe the bug
When config Vite:
Cause the following code replacement problems
https://github.com/BerkeleyTrue/warning/blob/122d08acff1b42ed421aa027c1f5fabe207f38d5/warning.js#L17
This line of code will be replaced with
var false = false
that Cause js to run an SyntaxError:Unexpected keyword 'false'
.Reproduction
When config Vite:
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: