i need to use http-server brb
okay here
yeah theres
no import issues here
just the cors stuff
but nothing about importing stuff
actually one of the textes inside these imported scripts is working on the page
so it means that they've been correctly imported into the app.jsx file
Interesting...so maybe it is a netlify problem lol
THEY JUST CENSORED MY POST ๐
now im getting this
es:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
then this
index-xNIsFJLs.js:63 Error loading module: TypeError: Failed to fetch dynamically imported module: https://wopen.netlify.app/assets/langs/es
i found how the build encrypts the js main script where it imports the dynamic module
var t = vg(()=>import("./langs/" + e), __vite__mapDeps([]));
and im not sure on what to think
it seems to be all good
like you can see the file is clearly not even changing its path after the build
im actually lost here
ill try pushing all the langs scripts into the src folder
so i fixed it by changing
export const data
to
export { data }
and the import module looks like this
let dataModule = import(`./langs/_${userLanguage}.js`);
i also changed scripts name with an underscore before their names
but thats optional
apparently it had to do with the way i was writing the overload
instead of doing './langs/' + userLanguage
you do ./langs/${userLanguage}
[SOLVED] Netlify moving dynamic imports into /public/assets/ folder
Recommended threads
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...
- SyntaxError: Unexpected end of JSON inpu...
I am trying to create a fcm push notification service using appwrite functions with its REST API to invoke that function from my client side app and getting thi...