npm install webpack -gwebpack ./app.js bundle.jsOpen index.html in the browser
add the file of webpack.config.js as following
module.exports = {
entry: "./app.js",
output: {
filename: "bundle.js"
}
}webpack --watchTo show the resule as above command, we can write code as following
module.exports = {
entry: "./app.js",
output: {
filename: "bundle.js"
},
watch: true
}
npm install webpack-dev-server -g
webpack-dev-server- Open URL
http://localhost:8080/webpack-dev-server/],http://localhost:8080/orhttp://localhost:8080/index.htmlorhttp://localhost:8080/webpack-dev-server/index.htmlin the browser.
npm install babel-core babel-loader babel-preset-es2015 jshint jshint-loader node-libs-browser --save-devnpm install strip-loader --save-dev | npm install http-server -gwebpack-dev-server -dAs above command, You can use the key of debugger to debug.