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
Error:
`ERROR in ./src/index.tsx
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
\node_modules\thread-loader\dist\cjs.js:3
import index from './index.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module`
Expected Behavior
Can support ESM
How Do We Reproduce?
Please paste the results of npx webpack-cli info here, and mention other relevant information
`
ERROR in ./src/index.tsx
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
xxx\node_modules\thread-loader\dist\cjs.js:3
import index from './index.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:77:18)
at wrapSafe (node:internal/modules/cjs/loader:1288:20)
at Module._compile (node:internal/modules/cjs/loader:1340:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at loadLoader (xxx\node_modules\loader-runner\lib\loadLoader.js:19:17)
at iteratePitchingLoaders (xxx\node_modules\loader-runner\lib\LoaderRunner.js:182:2)
webpack 5.97.1 compiled with 1 error in 5170 m`
The text was updated successfully, but these errors were encountered:
Bug report
I setting ESLint v9 ESM.
Trong webpack, sử dụng 'thread-loader', but raise errror: SyntaxError: Cannot use import statement outside a module
Actual Behavior
webpack.config.mjs
use: [ 'thread-loader', { loader: 'babel-loader', options: { cacheDirectory: true, babelrc: false, }, }, ]
Error:
`ERROR in ./src/index.tsx
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
\node_modules\thread-loader\dist\cjs.js:3
import index from './index.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module`
Expected Behavior
Can support ESM
How Do We Reproduce?
Please paste the results of
npx webpack-cli info
here, and mention other relevant information`
ERROR in ./src/index.tsx
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
xxx\node_modules\thread-loader\dist\cjs.js:3
import index from './index.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:77:18)
at wrapSafe (node:internal/modules/cjs/loader:1288:20)
at Module._compile (node:internal/modules/cjs/loader:1340:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at loadLoader (xxx\node_modules\loader-runner\lib\loadLoader.js:19:17)
at iteratePitchingLoaders (xxx\node_modules\loader-runner\lib\LoaderRunner.js:182:2)
webpack 5.97.1 compiled with 1 error in 5170 m`
The text was updated successfully, but these errors were encountered: