3

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.

1
  • 2
    I see your styles file is pretty bit. Templates usually load tons of stuff. You may want to check which CSSs you are loading and if they are strictly necessary. Commented Sep 23, 2021 at 16:12

1 Answer 1

2

For the duplicated files issue, change:

"target": "es2017",

to

"target": "es5",

On your tsconfig.json

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.