html: add development server

This commit is contained in:
Shuanglei Tao
2018-05-02 23:27:50 +08:00
parent 2d78f5c6a5
commit 68b58829cd
9 changed files with 3148 additions and 448 deletions

16
html/webpack.prod.js Normal file
View File

@@ -0,0 +1,16 @@
const merge = require('webpack-merge');
const config = require('./webpack.config.js');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
module.exports = merge(config, {
mode: 'production',
plugins: [
new HtmlWebpackPlugin({
inlineSource: '.(js|css)$',
template: 'index.html'
}),
new HtmlWebpackInlineSourcePlugin()
]
});