quando dou este comando dá a seguinte mensagem de erro
> client@1.0.0 build-dev D:\Cursojs\projeto-webpack\client
> webpack --config webpack.config.js
Hash: f6825daca3353766dfbb
Version: webpack 3.1.0
Time: 901ms
Asset Size Chunks Chunk Names
bundle.js 4 kB 0 [emitted] main
[0] ./app-src/app.js 1.53 kB {0} [built] [failed] [1 error]
ERROR in ./app-src/app.js
Module build failed: ReferenceError: Unknown plugin "transform-es2015-modules-systemjs" specified in "D:\\Cursojs\\projeto-webpack\\client\\.babelrc" at 0, attempted to resolve relative to "D:\\Cursojs\\projeto-webpack\\client"
at D:\Cursojs\projeto-webpack\client\node_modules\babel-core\lib\transformation\file\options\option-manager.js:180:17
at Array.map (<anonymous>)
at Function.normalisePlugins (D:\Cursojs\projeto-webpack\client\node_modules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
at OptionManager.mergeOptions (D:\Cursojs\projeto-webpack\client\node_modules\babel-core\lib\transformation\file\options\option-manager.js:234:36)
at OptionManager.init (D:\Cursojs\projeto-webpack\client\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (D:\Cursojs\projeto-webpack\client\node_modules\babel-core\lib\transformation\file\index.js:212:65)
at new File (D:\Cursojs\projeto-webpack\client\node_modules\babel-core\lib\transformation\file\index.js:135:24)
at Pipeline.transform (D:\Cursojs\projeto-webpack\client\node_modules\babel-core\lib\transformation\pipeline.js:46:16)
at transpile (D:\Cursojs\projeto-webpack\client\node_modules\babel-loader\lib\index.js:49:20)
at Object.module.exports (D:\Cursojs\projeto-webpack\client\node_modules\babel-loader\lib\index.js:171:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! client@1.0.0 build-dev: `webpack --config webpack.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the client@1.0.0 build-dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\antho\AppData\Roaming\npm-cache\_logs\2020-12-15T19_46_33_547Z-debug.log
Meu webpack.config.js é :
const path = require('path');
module.exports = {
entry: './app-src/app.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
}
]
}
}
e meu package.json é:
{
"name": "client",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-dev": "webpack --config webpack.config.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"reflect-metadata": "^0.1.10"
},
"devDependencies": {
"babel-core": "^6.25.0",
"babel-loader": "^7.1.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-es2017": "^6.24.1",
"webpack": "^3.1.0"
}
}