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
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...
- Courtesy limit reset for non-profit migr...
Hi Team! I'm the architect for a 501(c)(3) non-profit project (Aaria's Blue Elephant) and we just hit our Free plan Database Read limit (currently at 164%). Th...