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 I put a %%%TEMPLATE%%% in the base option in vite.config.js the build starts to fail. This was working before vite v5.4.0.
I'd expect to get a warning but the build still passes. Use case is I'd like to serve multiple versions of the same app with different base urls. The %%%TEMPLATE%%% is later replaced across files with my own script to create those multiple versions. I suppose this could be done with relative path, but should the build fail like that?
(!) "base" option should start with a slash.
error during build:
URIError: URI malformed
at decodeURI (<anonymous>)
at resolveConfig (file:///home/projects/vitejs-vite-jsfwq5kp/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:66263:18)
at async build (file:///home/projects/vitejs-vite-jsfwq5kp/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:65160:18)
at async CAC.eval (file:///home/projects/vitejs-vite-jsfwq5kp/node_modules/vite/dist/node/cli.js:843:5)e
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 I put a %%%TEMPLATE%%% in the base option in vite.config.js the build starts to fail. This was working before vite v5.4.0.
I'd expect to get a warning but the build still passes. Use case is I'd like to serve multiple versions of the same app with different base urls. The %%%TEMPLATE%%% is later replaced across files with my own script to create those multiple versions. I suppose this could be done with relative path, but should the build fail like that?
Reproduction
https://stackblitz.com/edit/vitejs-vite-jsfwq5kp?file=package.json
Steps to reproduce
Run
npm install
followed bynpm run build
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.20.3 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: vite: 5.4.0 => 5.4.0
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: