最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Angular 7 build: How to remove output hash and default~<view1>~<module1> file? - Stack

programmeradmin4浏览0评论

I've build angular app using:

ng build --prod --named-chunks --output-hashing=none

It output module-A.js, module-B.js as expected but there are some files like default~<view1>~<module-1>~123xzy.js. (In runtime.js these default files are required)

I want to separate module-A.js to another domain but I must move also default~<view1>~<module-1>~123xzy.js, so it also affect view1.

How can I remove such default~<view1>~<module-1>~123xzy.js? I.e. Config to combine default~<view1>~<module-1>~123xzy.js into module-A.js? (And I don't want refactor all structure code to eliminate such files, is there any other lighter way?)

I've build angular app using:

ng build --prod --named-chunks --output-hashing=none

It output module-A.js, module-B.js as expected but there are some files like default~<view1>~<module-1>~123xzy.js. (In runtime.js these default files are required)

I want to separate module-A.js to another domain but I must move also default~<view1>~<module-1>~123xzy.js, so it also affect view1.

How can I remove such default~<view1>~<module-1>~123xzy.js? I.e. Config to combine default~<view1>~<module-1>~123xzy.js into module-A.js? (And I don't want refactor all structure code to eliminate such files, is there any other lighter way?)

Share Improve this question edited Nov 24, 2020 at 1:58 Tony 20.1k6 gold badges41 silver badges62 bronze badges asked Dec 17, 2019 at 3:05 o0omycomputero0oo0omycomputero0o 3,5344 gold badges35 silver badges46 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 19

You can use

ng build --prod --output-hashing none

or only

ng build --prod

Ref link

  1. https://github.com/angular/angular-cli/issues/8344

  2. https://github.com/angular/angular-cli/issues/1833

try adding common-chunks abd move with your separated modules

发布评论

评论列表(0)

  1. 暂无评论