-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2 imports run for same module after vite build
#9018
Comments
Though I've already posted same issue on svelte/kit, but this issue would be caused by vite bundling process |
The two imports isn't the problem, but rather of how Rollup handles star import vs default import for external modules, which isn't aligned with how It would also be better to avoid importing |
@bluwy
But it didn't fix the issue. However, you gave me great hint to fit it.
Then it worked. |
I close this issue thanks to @bluwy |
Describe the bug
command
vite build
doesn't work by the following errorThis error occurred by the following code in generated index.svelte.js
_m0.util is undefined
Because somehow generated file includes 2 import for same module
And according to docs: tsconfig#esModuleInterop,
So
import * as _m0 from "protobufjs/minimal.js";
is not required at all.Reproduction
https://github.com/hiromaily/svelte-sample/tree/main/app
git clone https://github.com/hiromaily/svelte-sample.git cd app npm install npx vite build
System Info
Used Package Manager
npm
Logs
$ npx vite build
.svelte-kit/output/server/entries/pages/index.svelte.js file includes strange import
package.json is
Validations
The text was updated successfully, but these errors were encountered: