You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
misc/babel-bugs/babel-8.0.0 is π¦ 1.0.0 via β¬’ v20.4.0
β ./node_modules/.bin/webpack
asset main.js 1.53 KiB [emitted] (name: main)
./src/main.ts 39 bytes [not cacheable] [built] [code generated] [1 error]
ERROR in ./src/main.ts
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: The `version` export of @babel/core is only accessible from the CommonJS version after that the ESM version is loaded.
at notLoadedError (/Users/nic/Documents/misc/babel-bugs/babel-8.0.0/node_modules/@babel/core/cjs-proxy.cjs:47:10)
at Object.get (/Users/nic/Documents/misc/babel-bugs/babel-8.0.0/node_modules/@babel/core/cjs-proxy.cjs:40:25)
at Object.<anonymous> (/Users/nic/Documents/misc/babel-bugs/babel-8.0.0/node_modules/babel-loader/lib/index.js:13:23)
at Module._compile (node:internal/modules/cjs/loader:1233:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:119:18)
at loadLoader (/Users/nic/Documents/misc/babel-bugs/babel-8.0.0/node_modules/loader-runner/lib/loadLoader.js:19:17)
webpack 5.88.2 compiled with 1 error in 34 ms
Environment
Babel 8.0.0-alpha.0
The text was updated successfully, but these errors were encountered:
Since babel.version is a constant string defined from PACKAGE_JSON.version, can we duplicate that to the cjs-proxy? In a user hat I can accept that babel.otherFunctions require complex loading logic so we don't want to have both CJS and ESM versions running. But that's not the story of a constant string.
π»
How are you using Babel?
babel-loader (webpack)
Current and expected behavior
It throws
Environment
Babel 8.0.0-alpha.0
The text was updated successfully, but these errors were encountered: