ui: add sourcemap and version string

This commit is contained in:
undefined committed 2022-05-06 01:42:43 +08:00
1 parent 34aa867672
commit e9e2695fdd
5 files changed
+7 -1

No files matched your search

@@ -81,6 +81,7 @@ export default function (env = {}) {
mode: (env.production || env.measure) ? 'production' : 'development',
profile: true,
context: root(),
devtool: env.production ? 'source-map' : 'eval-source-map',
entry: {
hydro: './entry.js',
polyfill: './polyfill.ts',
@@ -211,6 +212,7 @@ export default function (env = {}) {
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: env.production ? '"production"' : '"debug"',
VERSION: JSON.stringify(require('@hydrooj/ui-default/package.json').version),
},
}),
new webpack.LoaderOptionsPlugin({