manfredsteyer / mf-angular-13

3 stars 5 forks source link

Runtime error in production mode #2

Closed gschuager closed 2 years ago

gschuager commented 2 years ago

When trying to run the application in production mode, the following error shows in the browser console:

polyfills.js:1 Uncaught Error: Automatic publicPath is not supported in this browser
    at polyfills.js:1
    at polyfills.js:1

image

To run the app I updated package.json with the following changes:

-    "@angular-architects/module-federation": "14.0.0-beta.5",
-    "@angular-architects/module-federation-tools": "14.0.0-beta.3",
+    "@angular-architects/module-federation": "14.0.0-beta.0",
+    "@angular-architects/module-federation-tools": "14.0.0-beta.0",

Then removed package-lock.json, install dependencies with npm -i --legacy-peer-deps and executed:

ng serve shell --configuration=production
ng serve mfe1 --configuration=production
gobedson commented 2 years ago

hello @gschuager was you able to solve this ?

gschuager commented 2 years ago

I didn't try anymore with this repo.

The underlying issue was solved; see https://github.com/angular-architects/module-federation-plugin/issues/96