Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

263
Visualizações
angular 12 - disable source map for speeding up serve time and reduce memory

My node memory is around 2gb while using nx serve app or ng serve

how can i reduce the memory use and speed up during development time ?

i tried to disable the source map but i dont see any changes in memory or in files while open chrome dev tools for example ( resource 14Mb)

following conf does not work :



        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "configurations": {
            "production": {
              "browserTarget": "app:build:production"
            },
            "development": {
              "browserTarget": "app:build:development"
            }
          },
          "defaultConfiguration": "development",
          "options": {
            "port": 4200,
            "sourceMap":{
                "scripts": false,
                "styles": false,
                "vendor": false
            }
          },
  "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "outputs": ["{options.outputPath}"],
          "options": {
            "outputPath": "dist/apps/app",
            "index": "apps/app/src/index.html",
            "main": "apps/app/src/main.ts",
            "polyfills": "apps/app/src/polyfills.ts",
            "tsConfig": "apps/app/tsconfig.app.json",
            "inlineStyleLanguage": "scss",
            "assets": [
            ],
            "styles": ["apps/app/src/styles.scss"],
            "stylePreprocessorOptions": {
              "includePaths": ["libs/styles", "apps/app/src/assets/scss"]
            },
            "scripts": []
          },
         "configurations": {
          "development": {
              "buildOptimizer": false,
              "optimization": true,
              "vendorChunk": true,
              "extractLicenses": false,
              "sourceMap": false,
              "namedChunks": true
            }
         }
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can reduce the startup time of angular build & ng serve by using this package

# install globally
npm i -g ngc-esbuild
# or locally
npm i ngc-esbuild

and then add a command the package.json's scripts according to this,

"scripts": {
  "esbuild": "ngc-esbuild --minify true --sourcemap false --port 6500 --open"
}

Now run it via npm run esbuild, it will startup your angular app within 1s second or less.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda