From 1fcf29279f31860d63843eff92235bda82926740 Mon Sep 17 00:00:00 2001 From: liabru Date: Sat, 28 Sep 2019 14:53:10 +0100 Subject: [PATCH] Set loose build version on dev server --- webpack.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 9709d5c..28236f5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,6 +9,7 @@ module.exports = (env = {}) => { const minimize = env.MINIMIZE || false; const edge = env.EDGE || false; const maxSize = minimize ? 100 * 1024 : 512 * 1024; + const isDevServer = process.env.WEBPACK_DEV_SERVER; const commitHash = execSync('git rev-parse --short HEAD').toString().trim(); const version = !edge ? pkg.version : `${pkg.version}-alpha-${commitHash}`; @@ -37,7 +38,7 @@ module.exports = (env = {}) => { plugins: [ new webpack.BannerPlugin(banner), new webpack.DefinePlugin({ - __MATTER_VERSION__: JSON.stringify(version), + __MATTER_VERSION__: JSON.stringify(!isDevServer ? version : '*'), }) ], externals: {