Vite dev server is unable to import @babel/standalone
#16435
Labels
feat: deps optimizer
Esbuild Dependencies Optimization
has workaround
inconsistency
Inconsistency between dev & build
p2-edge-case
Bug, but has workaround or limited in scope (priority)
Describe the bug
I want to run
@babel/standalone
in the browser. When I tried it in dev mode, the error is alwaysUncaught TypeError: babel is undefined
. When I build it@babel/standalone
is correctly bundled into the application and everything works great.My assumption would be that this should also work in dev mode.
Note: This happens with the latest
vite@5.2.9
and latest@babel/standalone@7.24.4
Reproduction
https://github.com/Mad-Kat/vite-dev-babel-reproduction/tree/main
Steps to reproduce
npm install
npm run dev
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: