Home > Blockchain >  Angular Build creating files twice
Angular Build creating files twice

Time:09-24

Im having an issue with a specific project Im basing on a template I purchased for an Administration Panel.

When I build the bundle (which I did just to see its size) Im getting the following files and sizes

enter image description here

This template had dozens of different components, which I got rid of, but I still have the following issues:

  1. main is being created twice, so does runtime and polyfills. My "target" at tsconfig is "es2017",

  2. I've deleted all "nested" routes, but I still have traces of Lazy Chunk files. Is there anywhere I can set "not" to use lazy load concept?

I believe the problem is at a tsconfig.json level but Im unable to identify it.

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "noImplicitReturns": false,
    "strictPropertyInitialization": false,
    "noFallthroughCasesInSwitch": true,
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2017",
    "module": "es2020",
    "lib": [
      "es2018",
      "dom"
    ],
    "noImplicitAny": false,
  },
  "angularCompilerOptions": {
    "enableI18nLegacyMessageIdFormat": false,
    "strictInjectionParameters": false,
    "strictInputAccessModifiers": false,
    "strictTemplates": false
  }
}

Thanks for the help.

Danielle.

CodePudding user response:

For the duplicated files issue, change:

"target": "es2017",

to

"target": "es5",

On your tsconfig.json

  • Related