Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): use es2015 when generating server…
Browse files Browse the repository at this point in the history
… bundles

ES2020 can contain JS syntax which are not compatible with all supported Node.js versions such as optional chaining.
  • Loading branch information
alan-agius4 committed Nov 1, 2021
1 parent 180659d commit ea926db
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export function getServerConfig(wco: WebpackConfigOptions): Configuration {

return {
resolve: {
mainFields: ['es2020', 'es2015', 'main', 'module'],
mainFields: ['es2015', 'main', 'module'],
conditionNames: ['es2015', '...'],
},
output: {
libraryTarget: 'commonjs',
Expand Down

0 comments on commit ea926db

Please sign in to comment.