|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import webpack from 'webpack';
|
|
|
|
|
|
|
|
|
|
import GitRevisionPlugin from 'git-revision-webpack-plugin';
|
|
|
|
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
|
|
|
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
|
|
|
|
|
|
|
|
@ -7,6 +7,7 @@ import {
|
|
|
|
|
SRC, BUILD, PORT, PUBLIC,
|
|
|
|
|
} from './constants';
|
|
|
|
|
|
|
|
|
|
const gitRevisionPlugin = new GitRevisionPlugin();
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
watch: true,
|
|
|
|
@ -89,6 +90,9 @@ module.exports = {
|
|
|
|
|
hints: false,
|
|
|
|
|
},
|
|
|
|
|
plugins: [
|
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
|
COMMITHASH: JSON.stringify(gitRevisionPlugin.commithash()),
|
|
|
|
|
}),
|
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
|
chunks: ['index'],
|
|
|
|
|
template: `${SRC}index.html`,
|
|
|
|
|