Missing .js files in the html_qer-app-portal folder (.zip) when building with the same commands in github actions

In our angular CI/CD pipeline (Github actions), not all files are generated during build in the html_qer-app-portal folder (.zip):

html (folder)
38.js
41.js
48.js
51.js
91.js
193.js
221.js
310.js
357.js
366.js
522.js
727.js
728.js

Where do these files come from, and how can we include them in our .zip files to display the entire page?

Parents
  • I suppose you're on v9.3?

    The files you are referring to, are chunk files created by webpack during the optimizing stage, in order to support lazy loading ES modules (in this case the plugins).

    They are only generated if the plugin libraries have been compiled beforehand. Make sure that you use the production flag (npm run build:production qer-app-portal) in the pipeline. The underlying nx script takes care of all dependencies by itself.

    If you want to reproduce it locally:

    1. Remove the html folder from your repo
    2. Remove everything in "dist/" except "qbm" and "qer"
    3. Run "npm run build qer-app-portal" (← Note: Without the production flag)

    The 234, 345, 567, 678, ... files should be gone.

    Now try "npm run build:production qer-app-portal" (this will take longer). Now you should see them again.

Reply
  • I suppose you're on v9.3?

    The files you are referring to, are chunk files created by webpack during the optimizing stage, in order to support lazy loading ES modules (in this case the plugins).

    They are only generated if the plugin libraries have been compiled beforehand. Make sure that you use the production flag (npm run build:production qer-app-portal) in the pipeline. The underlying nx script takes care of all dependencies by itself.

    If you want to reproduce it locally:

    1. Remove the html folder from your repo
    2. Remove everything in "dist/" except "qbm" and "qer"
    3. Run "npm run build qer-app-portal" (← Note: Without the production flag)

    The 234, 345, 567, 678, ... files should be gone.

    Now try "npm run build:production qer-app-portal" (this will take longer). Now you should see them again.

Children
No Data