Eptagone / Vite.AspNetCore

Small library to integrate Vite into ASP.NET projects
MIT License
243 stars 34 forks source link

After update to version 2.1.0, CSS files does not work in published version #120

Closed Denis6902 closed 3 months ago

Denis6902 commented 3 months ago

Describe the bug When I make new css file and I want to link to this file in .cshtml file, it works in development version but not in published version

To Reproduce Steps to reproduce the behavior:

  1. Download and run ViteNET.MVC example from this repo
  2. Create new random .css file with some random content like * { outline: 1px solid red; }
  3. Add this file to rollupOptions in vite.config.ts to the input
  4. Add link to this css file in _Layout.cshtml like <link rel="stylesheet" vite-href="~/test.css" asp-append-version="true" />

Expected behavior CSS File should work in Development mode and also after publish (with dotnet) in published version

Screenshots When running published version: image

Publishing: image

Device (please complete the following information):

Additional context

Eptagone commented 3 months ago

Hi, thanks for your report. You're right. I'll fix it in a moment.