-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
Description
Describe the bug
vite 3.0.2 writes imports to bundle incorrectly, but vite2 works fine:
main.js
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
console.log(_asyncToGenerator);
build command:
vite build --ssr main.js
dist/main.mjs
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js";
console.log(_asyncToGenerator);
there should not be the .js
extensions, because the direct paths is restricted by the @babel/runtime-corejs3/package.json
Reproduction
See this repo
System Info
System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
Memory: 6.11 GB / 15.89 GB
Binaries:
Node: 16.15.1 - E:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.11.0 - E:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1023.0), Chromium (103.0.1264.62)
Internet Explorer: 11.0.19041.906
Used Package Manager
pnpm
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.