add gitRevisionPugin to webpack.dev.local

pull/74/head
Szymon Lesisz 6 years ago
parent 12755bace0
commit 02f442c71b

@ -1,5 +1,6 @@
import webpack from 'webpack'; import webpack from 'webpack';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import GitRevisionPlugin from 'git-revision-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin';
import CopyWebpackPlugin from 'copy-webpack-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin';
import MiniCssExtractPlugin from '../../trezor-connect/node_modules/mini-css-extract-plugin'; import MiniCssExtractPlugin from '../../trezor-connect/node_modules/mini-css-extract-plugin';
@ -15,6 +16,8 @@ import {
PORT, PORT,
} from './constants'; } from './constants';
const gitRevisionPlugin = new GitRevisionPlugin();
module.exports = { module.exports = {
watch: true, watch: true,
mode: 'development', mode: 'development',
@ -163,6 +166,7 @@ module.exports = {
new webpack.DefinePlugin({ new webpack.DefinePlugin({
LOCAL: JSON.stringify(`http://localhost:${PORT}/`), LOCAL: JSON.stringify(`http://localhost:${PORT}/`),
COMMITHASH: JSON.stringify(gitRevisionPlugin.commithash()),
}), }),
// ignore node lib from trezor-link // ignore node lib from trezor-link

Loading…
Cancel
Save