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

@ -24,6 +24,7 @@
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off"
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-ts-comment": "off"
}
}

View file

@ -46,6 +46,8 @@ export const getUniversalRenderingContext = (
result.insights = {
isWebGL2: result.isWebGL2,
// @ts-ignore: injected by webpack
sdf2dVersion: __VERSION__,
extensions: {},
renderPasses: {
distance: {},

View file

@ -2,6 +2,7 @@ export interface RendererInfo {
isWebGL2: boolean;
vendor?: string;
renderer?: string;
sdf2dVersion?: string;
extensions: { [name: string]: boolean };
floatInterpolationEnabled?: boolean;
programCount?: number;

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,