Error: Plugin/Preset files are not allowed to export objects, only functions. In C:\projects\js\chat\node_modules\babel-preset-stage-0\lib\index.js
/* webpack */
module.exports = {
entry: [__dirname +'/src/index.js'],
output: {
path: __dirname + '/public',
filename: 'bundle.js'
},
devtool: 'source-maps',
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
loader: "babel-loader",
query: {
presets: ["env", "stage-0", "react"]
},
}
]
},
plugins: []
}
/* */
// package
{
"name": "react-boilerplate",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack --mode development --watch",
"build": "webpack --mode production",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.6",
"babel-preset-env": "^1.7.0",
"css-loader": "^3.1.0",
"html-webpack-plugin": "^3.2.0",
"style-loader": "^0.23.1",
"webpack": "^4.36.1",
"webpack-cli": "^3.3.6"
},
"dependencies": {
"babel-preset-stage-0": "^6.24.1",
"react": "^16.8.6",
"react-dom": "^16.8.6"
}
}