Reputation: 85
I have a trouble with webpack and Cloudflare pages.
Origin: develop.kop-dev.pages.dev
When loading dynamically modules in typescript using Webpack there is a problem, it loads from incorrect origin. Everything loads (Static imports, Assets etc…) But dynamic import:
const { getSpellName, getSpellDescription } = await import('./KoP_Locale/abilites');
For some reason it is resolving with wrong URL. It should be develop.kop-dev.pages.dev/...
It was working well before i added .env to client-side (dotenv-webpack). I am not using process.env in any of the await import.
anyway, process.env works because my statics and assets loads correctly where i am using process.env...
Do you know what can be possibly wrong or what I am doing wrong? This is not an issue on my local.
Upvotes: 1
Views: 366