Browse Source

fix(api): production config was not reflected

pull/7198/head
KenTandrian 1 week ago
parent
commit
ec563c2e93
  1. 3
      apps/api/project.json
  2. 8
      apps/api/webpack.config.js

3
apps/api/project.json

@ -7,6 +7,9 @@
"generators": {}, "generators": {},
"targets": { "targets": {
"build": { "build": {
"configurations": {
"production": {}
},
"outputs": ["{workspaceRoot}/dist/apps/api"] "outputs": ["{workspaceRoot}/dist/apps/api"]
}, },
"copy-assets": { "copy-assets": {

8
apps/api/webpack.config.js

@ -7,7 +7,6 @@ const configValues = {
default: { default: {
compiler: 'tsc', compiler: 'tsc',
deleteOutputPath: false, deleteOutputPath: false,
generatePackageJson: true,
main: './src/main.ts', main: './src/main.ts',
outputPath: 'dist/apps/api', outputPath: 'dist/apps/api',
outputHashing: 'none', outputHashing: 'none',
@ -16,15 +15,16 @@ const configValues = {
tsConfig: './tsconfig.app.json' tsConfig: './tsconfig.app.json'
}, },
production: { production: {
optimization: true,
extractLicenses: true, extractLicenses: true,
inspect: false,
fileReplacements: [ fileReplacements: [
{ {
replace: './src/environments/environment.ts', replace: './src/environments/environment.ts',
with: './src/environments/environment.prod.ts' with: './src/environments/environment.prod.ts'
} }
] ],
generatePackageJson: true,
inspect: false,
optimization: true
} }
} }
}; };

Loading…
Cancel
Save