Replace browserify with webpack

This commit is contained in:
Shuanglei Tao
2018-01-17 00:10:44 +08:00
parent 2057ec5c9c
commit 9715585fc1
9 changed files with 3123 additions and 823 deletions

36
html/webpack.config.js Normal file
View File

@@ -0,0 +1,36 @@
const ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
output: {
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules\/(?!zmodem.js\/)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env']
}
}
}, {
test: /\.scss$/,
use: ExtractTextPlugin.extract({
use: [{
loader: "css-loader"
}, {
loader: "sass-loader"
}],
fallback: "style-loader"
})
}
]
},
plugins: [
new ExtractTextPlugin({
filename: 'bundle.css',
})
]
}