Bug Description
When using vite-plugin-conditional-compile, the sourcemap is broken. This issue occurs in the following environment:
- Vite version: 5.2.6
vite-plugin-conditional-compile version: 1.4.4
- Operating System: macOS
- Node version: 20.10.0
- Package manager pnpm: 8.15.5
Reproduction
Unfortunately, I cannot provide a link to a repo that can reproduce the problem due to the proprietary nature of the project. However, the issue arises when using the vite-plugin-conditional-compile in the Vite configuration file.
Steps to Reproduce
- Open the Vite configuration file (vite.config.ts).
- In the configuration file, set sourcemap: true.
- Build or run the project.
- Check the index-xxx.js.map file. At this point, you can confirm that the contents of the file are corrupted.
Config
// excerpt from `vite.config.ts`
plugins: [
vitePluginConditionalCompile({
exclude: [
...,
],
env: {
DEV: mode === 'development',
},
}),
...,
],
...,
build: {
...,
sourcemap: true,
Thank you so much for creating this plugin. The plugin you've created is extremely valuable to our project and has been of great help. We deeply appreciate your effort and contribution.
Bug Description
When using
vite-plugin-conditional-compile, the sourcemap is broken. This issue occurs in the following environment:vite-plugin-conditional-compileversion: 1.4.4Reproduction
Unfortunately, I cannot provide a link to a repo that can reproduce the problem due to the proprietary nature of the project. However, the issue arises when using the
vite-plugin-conditional-compilein the Vite configuration file.Steps to Reproduce
Config
Thank you so much for creating this plugin. The plugin you've created is extremely valuable to our project and has been of great help. We deeply appreciate your effort and contribution.