Skip to content

Commit

Permalink
feat(utils): add es2015 to ngcc script's properties (#701)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl authored Jan 5, 2021
1 parent 0f92a4d commit a13070b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @typedef {import('ts-jest')} */
/** @type {import('@jest/types').Config.InitialOptions} */
require('./ngcc-jest-processor');

/** @type {import('ts-jest/dist/types').ProjectConfigTsJest} */
module.exports = {
preset: 'ts-jest',
globals: {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/ngcc-jest-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if (canRunNgcc) {
* Currently Jest requires `commonjs` so we only need to ask `ngcc` to produce `umd` outputs. Later when switching
* to ESM, we can change to different properties to produce ESM outputs.
*/
...['main'],
...['es2015', 'main'],
'--first-only' /** compileAllFormats */,
'false', // make sure that `ngcc` runs on subfolders as well
'--async',
Expand Down

0 comments on commit a13070b

Please sign in to comment.