npm install --save-dev webpack webpack-cli @babel/core babel-loader @babel/preset-react code example
Example: jsx babel webpack
module.exports = {
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
}
]
}
};