Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to serve language files with MFE. #396

Open
curiousdev opened this issue Jul 27, 2023 · 0 comments
Open

Unable to serve language files with MFE. #396

curiousdev opened this issue Jul 27, 2023 · 0 comments

Comments

@curiousdev
Copy link

Can you provide some guidance on the following situation? My MFE builds and runs just fine with our CDN, but something about the localhost developer experience is broken. I'm sure it's a misconfiguration, but I can't see it.

Is there a specific configuration needed to serve the language files. Apologies if this is the wrong repository, happy to re-post in the correct place.

My javascript artifacts and json artifacts built successfully into the repo's dist folder.

> ls dist/mytest-mfe/remoteEntry* 
  dist/mytest-mfe/remoteEntry.js
  dist/mytest-mfe/remoteEntry.js.map

> ls dist/mytest-mfe/assets/i18n/en.json
  en.json

Moreover, I can successfully can curl 200 for the javascript remoteEntry.js

> curl -vvv http://localhost:3000/remoteEntry.js     
> GET /remoteEntry.js HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.88.1
> Accept: */*
> 
< HTTP/1.1 200 OK
...large...javascript...body...redacted...

However, I cannot curl the langauge en.json file.

curl -vvv http://localhost:3000/assets/i18n/en.json
> GET /assets/i18n/en.json HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.88.1
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< Content-Length: 158
< 
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /assets/i18n/en.json</pre>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant