-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Description
This Issue re-open form #9180
Related Issue electron-vite/electron-vite-vue#212
Describe the bug
I tried to Debug to find out the BUG, and finally I found that the BUG is caused by esbuild
👉 esbuild#2441 🐞 import.meta.url transpile.
But this BUG only appears when I use base: './' and format: 'cjs'. The following options are often used with Electron-Renderer
export {
base: './', // Here
build: {
minify: false,
rollupOptions: {
output: {
format: 'cjs', // Here
},
},
},
}Reproduction
https://stackblitz.com/edit/vite-invalid-url?file=vite.config.js
System Info
System:
OS: macOS 10.15.7
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Memory: 1010.00 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 16.13.0 - /usr/local/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 8.1.0 - /usr/local/bin/npm
Browsers:
Chrome: 103.0.5060.134
Safari: 15.4
npmPackages:
vite: ^3.0.4 => 3.0.4Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- 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.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable