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
vite v2.6.7 building for production...
✓ 2 modules transformed.
[rollup-plugin-dynamic-import-variables] Unexpected token (12:16)
file: /Users/johnny/Sites/vite-define-bug/src/index.tsx:12:16
error during build:
SyntaxError: Unexpected token (12:16)
at Parser.pp$5.raise (/Users/johnny/Sites/vite-define-bug/node_modules/rollup/dist/shared/rollup.js:19495:13)
at Parser.pp.unexpected (/Users/johnny/Sites/vite-define-bug/node_modules/rollup/dist/shared/rollup.js:16820:8)
at Parser.pp$4.parsePropertyValue (/Users/johnny/Sites/vite-define-bug/node_modules/rollup/dist/shared/rollup.js:19216:17)
at Parser.pp$4.parseProperty (/Users/johnny/Sites/vite-define-bug/node_modules/rollup/dist/shared/rollup.js:19165:8)
at Parser.pp$4.parseObj (/Users/johnny/Sites/vite-define-bug/node_modules/rollup/dist/shared/rollup.js:19111:21)
at Parser.pp$4.parseExprAtom (/Users/johnny/Sites/vite-define-bug/node_modules/rollup/dist/shared/rollup.js:18846:17)
at Parser.pp$4.parseExprSubscripts (/Users/johnny/Sites/vite-define-bug/node_modules/rollup/dist/shared/rollup.js:18662:19)
at Parser.pp$4.parseMaybeUnary (/Users/johnny/Sites/vite-define-bug/node_modules/rollup/dist/shared/rollup.js:18628:17)
at Parser.pp$4.parseExprOps (/Users/johnny/Sites/vite-define-bug/node_modules/rollup/dist/shared/rollup.js:18561:19)
at Parser.pp$4.parseMaybeConditional (/Users/johnny/Sites/vite-define-bug/node_modules/rollup/dist/shared/rollup.js:18544:19)
error Command failed with exit code 1.
Describe the bug
Some part of production build or minification breaks globals set in
config.define
.I have the minimal reproduction of the issue linked below 👇
Related:
#5247
#2605
Reproduction
https://github.com/johnnybenson/vitejs-bug-repro-define
Observe that the values are set in config.
The build fails with the following error:
System Info
Used Package Manager
yarn
Logs
Variations
JSON.stringify
around boolean globalsesbuild
andterser
for minificationtsc
preceding buildValidations
The text was updated successfully, but these errors were encountered: