Open Daggle24 opened 1 year ago
Same here, i got solution, but it's not good solution for production mode,
u can set optimization: false
in angular.json config for production,
example :
"production": {
"optimization: false",
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "apps/greatdayhr-apps/src/environments/environment.ts",
"with": "apps/greatdayhr-apps/src/environments/environment.prod.ts"
}
],
"outputHashing": "none",
"customWebpackConfig": {
"path": "apps/greatdayhr-apps/webpack.prod.config.js"
}
},
Setting optimization:false
fixed the issue.
however, I'll leave the issue open until we get a more targeted solution for this!
agree, and there is information regarding the 'optimization' flag.
update, try to change file .browserlist
# Firefox ESR
# not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
Chrome >=79
ChromeAndroid >=79
Firefox >=70
Edge >=79
Safari >=14
iOS >=14
agree, and there is information regarding the 'optimization' flag.
Thx your solution really helps me.
In my case "optimization: false"
doesn't work
When I upload my builded files to an s3 bucket, I get this error, I noticed the error comes from this line:
main.ts
any load method from '@angular-architects/module-federation' gives me this error on my production bucket.
But on my localhost environment it works without any problem.
(Im guessing that is because im running my shell app with node instead of a static site.)
package.json
webpack.config.js:
tsconfig.json