Open fasidOnGit opened 4 years ago
x
The difference in bundle hash when "buildOptimizer": true and hence the bundle itself.
"buildOptimizer": true
I am building the application with and without sourcemaps (2 times), here is the snippet of the configurations
"configurations": { "production": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } ], "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, "budgets": [ { "type": "initial", "maximumWarning": "2mb", "maximumError": "6mb" } ] }, "srcmap": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } ], "optimization": true, "outputHashing": "all", "sourceMap": { "hidden": true, "scripts": true, "styles": true }, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, "budgets": [ { "type": "initial", "maximumWarning": "2mb", "maximumError": "6mb" } ] } }
Notice that, I have two configurations production and srcmap with "buildOptimizer": true the only difference is the sourcemap. where
production
srcmap
sourceMap: false
"sourceMap": { "hidden": true, "scripts": true,"styles": true }
If I run, ng build --prod and ng build --configuration=srcmap I get bundles with difference in their hashes.
ng build --prod
ng build --configuration=srcmap
According to the following issue, the above said bug shouldn't be happening because I am already using hidden sourcemap
related to https://github.com/angular/angular-cli/issues/8981
When I change to buildOptimizer: false in both production and srcmap then I run the build for both and then I get similar bundles.
buildOptimizer: false
Maybe related https://github.com/angular/angular-cli/issues/8981#issuecomment-356658544
🐞 Bug report
Command (mark with an
x
)Description
The difference in bundle hash when
"buildOptimizer": true
and hence the bundle itself.I am building the application with and without sourcemaps (2 times), here is the snippet of the configurations
Notice that, I have two configurations
production
andsrcmap
with"buildOptimizer": true
the only difference is the sourcemap. whereproduction
:sourceMap: false
srcmap
:"sourceMap": { "hidden": true, "scripts": true,"styles": true }
If I run,
ng build --prod
andng build --configuration=srcmap
I get bundles with difference in their hashes.According to the following issue, the above said bug shouldn't be happening because I am already using hidden sourcemap
related to https://github.com/angular/angular-cli/issues/8981
When I change to
buildOptimizer: false
in bothproduction
andsrcmap
then I run the build for both and then I get similar bundles.