-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Bug
Copy link
Labels
babel 8outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
babel-loader (webpack)
Input code
I use [email protected] build project, and it throw error:
node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js (5:9): "createRequire" is not exported by "__vite-browser-external", imported by "node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js"
3: import * as _t from '@babel/types';
4: import { parse } from '@babel/parser';
5: import { createRequire } from 'module';
^
6: import generator from '@babel/generator';
7: import template from '@babel/template';
code:
import {transform} from '@babel/core';
export const compile = (code: string) => {
return transform(code);
}
Configuration file name
No response
Configuration
No response
Current and expected behavior
can i use babel/core in browser? babel/standalone is to large now, I want use babe/core directly to reduce boundle size
Environment
- Babel 8.0.0-beta.1
- Node 22.12.0
- Vite 7.0.6
Possible solution
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
babel 8outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue