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
When using LightningCSS and building with Vite, URLs can be replaced with a reference ID containing $$ (e.g. gbjdc$$i / __VITE_ASSET__gbjdc$$i__).
When the generated URLs are then replaced with the built asset URLs, it searches for the asset using an incorrect ID, replacing $$ with $ (e.g. gbjdc$i).
Compiling message catalogs…
Done!
[sentry-vite-plugin] Info: Using environment variables configured in".env.sentry-build-plugin".
(node:570047) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
vite v5.2.6 building for production...
node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.node_modules/@tanstack/react-query/build/modern/useBaseQuery.js (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
[plugin:vite:resolve] [plugin vite:resolve] Module "fs" has been externalized for browser compatibility, imported by "/home/jackwakefield/workspace/apps/web/also-asked-frontend/node_modules/tiny-xlsx/src/index.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] [plugin vite:resolve] Module "stream" has been externalized for browser compatibility, imported by "/home/jackwakefield/workspace/apps/web/also-asked-frontend/node_modules/tiny-xlsx/node_modules/jszip/lib/readable-stream-browser.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
✓ 1904 modules transformed.
x Build failed in 9.48s
✨ [vite-plugin-robots]:
✓ Copied: .robots.production.txt -> dist/robots.txt
error during build:
RollupError: [vite:css-post] Plugin error - Unable to get file name for unknown file "gbjdc$i".
at getRollupError (file:///home/jackwakefield/workspace/apps/web/also-asked-frontend/node_modules/rollup/dist/es/shared/parseAst.js:376:41)
at error (file:///home/jackwakefield/workspace/apps/web/also-asked-frontend/node_modules/rollup/dist/es/shared/parseAst.js:372:42)
at FileEmitter.getFileName (file:///home/jackwakefield/workspace/apps/web/also-asked-frontend/node_modules/rollup/dist/es/shared/node-entry.js:19083:24)
at file:///home/jackwakefield/workspace/apps/web/also-asked-frontend/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:31702:43
at String.replace (<anonymous>)
at resolveAssetUrlsInCss (file:///home/jackwakefield/workspace/apps/web/also-asked-frontend/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:31701:37)
at Object.renderChunk (file:///home/jackwakefield/workspace/apps/web/also-asked-frontend/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:31784:36)
at async transformChunk (file:///home/jackwakefield/workspace/apps/web/also-asked-frontend/node_modules/rollup/dist/es/shared/node-entry.js:17723:16)
at async file:///home/jackwakefield/workspace/apps/web/also-asked-frontend/node_modules/rollup/dist/es/shared/node-entry.js:17797:17
at async Promise.all (index 0)
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 vuejs/core instead.
Describe the bug
When using LightningCSS and building with Vite, URLs can be replaced with a reference ID containing
$$
(e.g.gbjdc$$i
/__VITE_ASSET__gbjdc$$i__
).When the generated URLs are then replaced with the built asset URLs, it searches for the asset using an incorrect ID, replacing
$$
with$
(e.g.gbjdc$i
).Reproduction
https://stackblitz.com/edit/vitejs-vite-aaxr6p
Steps to reproduce
Run
npm install
followed bynpm run build
.System Info
Used Package Manager
yarn
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: