Add version string

This commit is contained in:
schmelczerandras 2020-10-31 16:02:45 +01:00
parent 068eff5d13
commit 9d22805fb0
4 changed files with 11 additions and 1 deletions

View file

@ -1,5 +1,6 @@
const path = require('path');
const TerserJSPlugin = require('terser-webpack-plugin');
const webpack = require('webpack');
const PATHS = {
entryPoint: path.resolve(__dirname, 'src/main.ts'),
@ -27,6 +28,11 @@ module.exports = {
'gl-matrix': 'gl-matrix',
'resize-observer-polyfill': 'resize-observer-polyfill',
},
plugins: [
new webpack.DefinePlugin({
__VERSION__: JSON.stringify(require('./package.json').version),
}),
],
optimization: {
minimize: true,
usedExports: true,