Files
dspace-angular/webpack/webpack.prod.ts
2024-09-03 21:38:00 +00:00

22 lines
639 B
TypeScript

import { EnvironmentPlugin } from 'webpack';
import { projectRoot } from './helpers';
import { commonExports } from './webpack.common';
module.exports = Object.assign({}, commonExports, {
plugins: [
...commonExports.plugins,
// @ts-expect-error: EnvironmentPlugin constructor types are currently to strict see issue https://github.com/webpack/webpack/issues/18719
new EnvironmentPlugin({
'process.env': {
NODE_ENV: 'production',
AOT: true,
},
}),
],
mode: 'production',
recordsOutputPath: projectRoot('webpack.records.json'),
entry: projectRoot('./server.ts'),
target: 'node',
});