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
Expected/desired behavior:
E:\webpack\src\js\test.js
1:1 error 'core-js' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
1:8 error Unexpected use of file extension "js" for "core-js/modules/es.object.to-string.js" import/extensions
2:1 error 'core-js' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
2:8 error Unexpected use of file extension "js" for "core-js/modules/es.promise.js" import/extensions
3:1 error 'core-js' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
3:8 error Unexpected use of file extension "js" for "core-js/modules/web.timers.js" import/extensions
13:5 warning Unexpected console statement no-console
17:1 warning Unexpected console statement no-console
Webpack Version:
4.9.1
Babel Core Version:
7.16.7
Babel Loader Version:
8.2.3
Please tell us about your environment:
Windows 10
Current behavior:
if set useBuiltIns: 'usage',then error is come:
{
test: /.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
targets: {
chrome: '60',
firefox: '60',
ie: '9',
safari: '10',
edge: '17'
},
useBuiltIns: 'usage',
corejs:3,
},
]
],
plugins:[
'@babel/plugin-transform-runtime',
]
}
}
},
Expected/desired behavior:
E:\webpack\src\js\test.js
1:1 error 'core-js' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
1:8 error Unexpected use of file extension "js" for "core-js/modules/es.object.to-string.js" import/extensions
2:1 error 'core-js' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
2:8 error Unexpected use of file extension "js" for "core-js/modules/es.promise.js" import/extensions
3:1 error 'core-js' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
3:8 error Unexpected use of file extension "js" for "core-js/modules/web.timers.js" import/extensions
13:5 warning Unexpected console statement no-console
17:1 warning Unexpected console statement no-console
✖ 8 problems (6 errors, 2 warnings)
my package.json is:
"devDependencies": {
"@babel/core": "^7.16.7",
"@babel/plugin-transform-runtime": "^7.16.8",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.16.8",
"babel-loader": "^8.2.3",
"core-js": "^3.20.3",
"css-loader": "^6.5.1",
"css-minimizer-webpack-plugin": "^3.3.1",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.25.4",
"file-loader": "^6.2.0",
"html-loader": "^3.1.0",
"html-webpack-plugin": "^5.5.0",
"mini-css-extract-plugin": "^2.4.7",
"postcss-loader": "^6.2.1",
"postcss-preset-env": "^7.2.3",
"style-loader": "^3.3.1",
"url-loader": "^4.1.1",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.7.3"
}
The text was updated successfully, but these errors were encountered: