1

I have configured my project in order to avoid the ES5 bundle that the build is generating. For that purpose, I have configured the .browserlists and tsconfig.json files as follow:

.browserslist file

last 1 Chrome version

tsconfig.json

{
  "compileOnSave": false,
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "module": "es2020",
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2017",
    "typeRoots": ["node_modules/@types"],
    "types": ["jest", "node"],
    "lib": ["es2018", "dom", "es2020.string"],
    "skipLibCheck": true
  },
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true,
    "enableIvy": true
  }
}

But it is still generating the ES5 bundle...

enter image description here

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
ÁlvaroSL
  • 71
  • 7
  • I wish but it is not... I get the correct result with the npx browserslist command and also, when using browserlist package instead of the file, the bundle remains. – ÁlvaroSL Jan 14 '22 at 07:15

1 Answers1

1

I fixed it by doing a new clean install. Basically:

  1. Remove node_modules and yarn.lock.json files.
  2. Clean yarn cache
  3. yarn install
ÁlvaroSL
  • 71
  • 7