Where do you execute npm run build ?
npm run build assets linking to root folder instead of sub folder
I am creating this project under a sub folder in one of my domains. I have the nginx configured so the sub folder thing is loading ok. But I realized that most of the js assets from npm run build, are actually loading from the root folder instead of sub folder which is not what I am looking for. Upon further investigation, I saw the asset files are loading like this in html...
<link rel="modulepreload" as="script" crossorigin="" href="/build/assets/Login-XYc9sZ4C.js">
and I see a lot of files loading this way thus nothing on the site is working although its rendering. I tried to search over and tested few things but its not working. Strangely, some of the URLs like this is loading full url so they are loading correctly.
My question is how or what do I set so that the href loads the full url or maybe remove that / in front of the /build href?
I do have these in the .env file
APP_ENV=production
APP_KEY=base64:key
APP_DEBUG=false
APP_URL=https://myurl.com/timesheet
SESSION_PATH=/timesheet
SESSION_DOMAIN=myurl.com
Thanks.
Please or to participate in this conversation.