
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
- Unable to read session cookie
Hi, when I am hitting Appwrite **/account** API. I am getting the user account details as expected in the response. However, with that API, Appwrite also adds a...
- Database error
My code: await databases.createDocument( process.env.APPWRITE_DATABASE, process.env.APPWRITE_COLLECTION_USER, data.userId, ...
- No Headers
Hi I have 2 appwrite functions, one is working fine on localhost, second is not even working on prod with https, i inspected the api call, no headers are being ...
