Olá executei todos os procedimentos desta aula e mesmo assim o meu arquivo bundle.js não foi minificado, o que pode ter ocorrido? Sou usuário Windows :(
arquivo webpack.config.js
const path = require("path");
const babiliPlugin = require('babili-webpack-plugin');
let plugins = [];
if(process.env.NODE_ENV == 'production') {
plugins.push(new babiliPlugin());
}
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"
}
}
]
},
plugins
};
`
arquivo 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",
"build-prod": "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",
"babili-webpack-plugin": "^0.1.1",
"webpack": "^3.1.0"
}
}