when I run my front-end react-admin project, it generates index.html in which I have:
<script type="module" crossorigin src="./assets/index-1ebfbf3a.js"></script>
<link rel="stylesheet" href="./assets/index-4aace80f.css">
However, when I upload it to website and considering my Django settings, it expects to find them in:
<script type="module" crossorigin src="static/assets/index-1ebfbf3a.js"></script>
<link rel="stylesheet" href="static/assets/index-4aace80f.css">
How can I add this prefix when I buid my project?
the dist contents will be transfered to static folder under Django root and these are my settings there:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'dist'),
)
I tried to set homepage
or start-url
in package.json to /static/
but it agains generate index without any prefix.