构建项目

This commit is contained in:
julyp
2020-01-13 16:25:20 +08:00
parent 0635957013
commit 0d3449f259
16 changed files with 9482 additions and 2 deletions

31
config/webpack.common.js Normal file
View File

@@ -0,0 +1,31 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.js',
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, '../public/index.html'),
inject: 'head'
})
],
module: {
rules: [{
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
{
loader: 'sass-loader',
options: {
sourceMap: false
}
}
]
}, ]
},
output: {
filename: 'smartUtils.[chunkhash:8].js',
path: path.resolve(__dirname, '../dist')
},
}