Louxsdon / django-breeze

Django Breeze provides a minimal and simple starting point for building a Django application with Inertia and Vite with minimal or no configuration. Styled with Tailwind CSS.
MIT License
53 stars 5 forks source link

static assets 404 in dev mode #9

Open gkibria opened 1 month ago

gkibria commented 1 month ago

Describe the bug Hi there! Firstly thanks for the package. I was playing with it for last couple of days now. I am trying to use vue 3 and primevue. But have some issues using static assets in the /src/assets folder. In the dev mode, there I am getting 404 error (see the image). I also tried to build it, but assets folder is completely ignored under /static/dist folder.

To Reproduce Steps to reproduce the behavior:

  1. Add an img tag in the vue page referencing vue.svg under /src/assets folder
  2. npm run dev
  3. See error in the console, terminal

Screenshots

Screenshot 2024-10-01 at 18 34 23

Desktop:

Additional context I also tried to add primeicons in the main.js file. (by the way, I renamed it from .jsx to .js and changed it in vite config)

import "primeicons/primeicons.css";

In dev mode, icon fonts also not found. see the image bellow.

Screenshot 2024-10-01 at 18 47 19

All the vite and django-breeze config is default and not modified. Could you please check?

info: files under /src/public folder works.

Thanks, Kibria

Louxsdon commented 1 week ago

Thank you @gkibria for spoting that bug, I will look into it and fix it ASAP. You can as well make a PR to fix it.