How to Speed up the First time loading time Angular 6 Application

前端 未结 4 1501
遥遥无期
遥遥无期 2021-02-01 10:48

I have created Angular Application in single module fully, after final deploy files are more than 8 Mb so for First time loading time is too slow,

i have tried with -

4条回答
  •  轮回少年
    2021-02-01 11:24

    If you are using node js as a intermediate server just add this.

    const express = require('express');
    const path = require('path');
    const compression = require('compression')
    const app = express();
    app.use(compression())
    

    By this way you enableTextCompression

    I have reduced the time half by using this.

提交回复
热议问题