0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-27 09:50:52 -05:00

Set loose build version on dev server

This commit is contained in:
liabru 2019-09-28 14:53:10 +01:00
parent f471d4e6dd
commit 1fcf29279f

View file

@ -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: {