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
- No server error on selfhosted appwrite
Please help me, my clients is ask what happen on their data? How can i make it up again?
- Upgrading selfhost version?
It is okay to upgrade version to higher one, of my current version is 1.7.4 to 1.8.1. Is that safe to do cause my clients already have data on that? Also is a...
- Streamlit UI and local DB
I want to use Appwrite for automation, like run watchdog service every morning 3 am. Anyone got suggestions, already explored github and documentation no luck. ...