const webpack = require('webpack'); const { createApiWebpackConfig } = require('./webpack.base'); module.exports = createApiWebpackConfig({ output: { clean: true, ...(process.env.NODE_ENV !== 'production' && { devtoolModuleFilenameTemplate: '[absolute-resource-path]', }), }, nxPlugin: { main: './src/main.ts', generatePackageJson: true, sourceMap: true, }, plugins: [ new webpack.DefinePlugin({ __APP_VERSION__: JSON.stringify(process.env.APP_VERSION || 'unknown'), }), ], });