Skip to content

Commit

Permalink
aaaaaaaaaaaaaaaaaaaaaaaaaaa
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadhabibi14 committed Jan 25, 2024
1 parent 5b5d738 commit 65c3b14
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ web/dist
collectedstatic
perpus-env
.venv
.env
.env
static
6 changes: 3 additions & 3 deletions perpus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,17 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/

STATIC_URL = '/static/'
STATIC_URL = 'static/'

# Where ViteJS assets are built.
DJANGO_VITE_ASSETS_PATH = BASE_DIR / 'web' / 'dist'
DJANGO_VITE_ASSETS_PATH = BASE_DIR / 'static'
DJANGO_VITE_DEV_MODE = True
if os.environ.get('WEB_ENV') == 'prod':
DJANGO_VITE_DEV_MODE = False
DJANGO_VITE_DEV_SERVER_PORT = 3000

# Name of static files folder (after called python manage.py collectstatic)
STATIC_ROOT = BASE_DIR
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")

# Include DJANGO_VITE_ASSETS_PATH into STATICFILES_DIRS to be copied inside
# when run command python manage.py collectstatic
Expand Down
7 changes: 3 additions & 4 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ export default defineConfig({
},
},
resolve: {
extensions: ['.js', '.jsx', '.json', '.svelte'],
extensions: ['.js', '.json', '.svelte'],
},
build: {
outDir: resolve('./web/dist'),
outDir: resolve('./static'),
assetsDir: '',
manifest: 'manifest.json',
emptyOutDir: true,
manifest: true,
target: 'es2015',
rollupOptions: {
input: {
Expand Down

0 comments on commit 65c3b14

Please sign in to comment.