We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
on vite build, I find that its creating the bundled files under. Something like: ${BASE_DIR}/${BASE_DIR}
vite build
I mean that the files are created relative to the project root, but it creates the whole /home/user/projectpath inside the project...
I checked that variable, and its correctly set as **/**home/user/django_app_path/static... with the starting slash.
Is there some configuration I'm missing?
My vite.config.js is very simple:
vite.config.js
import { defineConfig } from 'vite' import { djangoVitePlugin } from 'django-vite-plugin' export default defineConfig({ plugins: [ djangoVitePlugin([ 'ts/main.ts', 'scss/main.scss', ]) ], });
I tried settings the entry point paths on this file as absolute paths, but then I get a bunch of error messages related to django's settings.
Django's settings are mostly the default ones. (actually from wagtail, but not much diference):
STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.FileSystemFinder", "django.contrib.staticfiles.finders.AppDirectoriesFinder", ] STATICFILES_DIRS = [ os.path.join(PROJECT_DIR, "static"), ] STATIC_ROOT = os.path.join(BASE_DIR, "static") STATIC_URL = "/static/" MEDIA_ROOT = os.path.join(BASE_DIR, "media") MEDIA_URL = "/media/"
I can't manage to understand why it would do that...
The text was updated successfully, but these errors were encountered:
Did you try setting
DJANGO_VITE_PLUGIN = { 'BUILD_DIR': getattr(settings, 'STATIC_ROOT') or 'static', # This value here }
Sorry, something went wrong.
No branches or pull requests
Hello,
on
vite build
, I find that its creating the bundled files under. Something like: ${BASE_DIR}/${BASE_DIR}I mean that the files are created relative to the project root, but it creates the whole /home/user/projectpath inside the project...
I checked that variable, and its correctly set as **/**home/user/django_app_path/static... with the starting slash.
Is there some configuration I'm missing?
My
vite.config.js
is very simple:I tried settings the entry point paths on this file as absolute paths, but then I get a bunch of error messages related to django's settings.
Django's settings are mostly the default ones. (actually from wagtail, but not much diference):
I can't manage to understand why it would do that...
The text was updated successfully, but these errors were encountered: