add more steps, fix grammar, show version

This commit is contained in:
David Reed 2023-01-01 16:19:47 -05:00
parent 5119555f3f
commit 54f9b43995
No known key found for this signature in database
GPG key ID: 2211691D8A1EE72F
2 changed files with 34 additions and 9 deletions

View file

@ -2,6 +2,12 @@ import { fileURLToPath } from 'url';
import ESLintPlugin from 'eslint-webpack-plugin';
import TerserPlugin from 'terser-webpack-plugin';
import CopyPlugin from 'copy-webpack-plugin';
import webpack from 'webpack';
import { readFile } from 'fs/promises';
// read version from package.json
const pk = JSON.parse(await readFile(new URL('package.json', import.meta.url)));
process.env.ULTRAVIOLET_VERSION = pk.version;
const isDevelopment = process.env.NODE_ENV !== 'production';
@ -67,6 +73,7 @@ const config = {
},
],
}),
new webpack.EnvironmentPlugin('ULTRAVIOLET_VERSION'),
],
performance: {
// suppress "entrypoint size limit" warning