Open sapphi-red opened 11 months ago
Can't find the difference between vite bundles and rollup bundles in the reproduction project, nor the duplicate module.
This only happens on Windows. Did you try it on Windows?
I ran it on stackblitz, i will try it locally later.
---Original---
From: @.>
Date: Tue, Feb 27, 2024 13:09 PM
To: @.>;
Cc: "Hawtin @.**@.>;
Subject: Re: [vitejs/vite] Duplicate module on Windows ifbuild.rollupOptions.input
is relative path (Issue #15153)
This only happens on Windows. Did you try it on Windows? image.png (view on web)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Describe the bug
If
build.rollupOptions.input
is relative path, like below,the module is duplicated only on Windows. (In this example,
src/lib/example.js
is bundled twice. (This doesn't happen with rollup)The workaround is to call
path.resolve()
(e.g.path.resolve('src/lib/example.js')
.Reproduction
https://stackblitz.com/edit/rollup-repro-kizyn2?file=vite.config.js
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations