Eptagone / Vite.AspNetCore

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

AutoRunning the dev server causes a shell script to appear in the root directory. #112

Closed dagstuan closed 5 months ago

dagstuan commented 6 months ago

Describe the bug Both in the examples and my own code, every time I start the application a new shell script shows up in the root directory of my app. Such as 326cca0f61ce49b7909cb09623b72153.sh. If I manually start the vite dev server in advance, no script shows up.

image

To Reproduce Steps to reproduce the behavior:

  1. Clone this repository. Go to /examples/libraries/ViteNET.React
  2. Run dotnet run
  3. Open the webpage to start the vite dev server.
  4. See the new shell script in the root directory

Expected behavior No shell script to show up

Screenshots

image

Device (please complete the following information):

Eptagone commented 6 months ago

Hello @dagstuan. I just changed the script directory in 0f9bf04f733e8fc3103ad9929d2e87d330b55a72. Branch dev.

I think it should be enough but if you or someone with MacOS could help me by verifying it locally before publishing it, I would greatly appreciate it.

dagstuan commented 6 months ago

Hello again, the changes makes the script show up in bin/Debug/net8.0 instead, which is a definite improvement. However, there is still the issue of the script being recreated every time I restart the app, so over time the bin/debug/net8.0-folder will be swarmed with shell scripts. Is there any way of re-using the script if it already exists? Maybe by creating a file name based on the hash of the contents instead of a random name every time?

image
Eptagone commented 5 months ago

Hi again @dagstuan. I just changed the script name to be a constant value in https://github.com/Eptagone/Vite.AspNetCore/commit/4136a183b9482d36ed76aa8a4c73263b9af398a9. Branch dev.

Please confirm to me if it works correctly or if any more changes need to be made.

dagstuan commented 5 months ago

The changes work great now! Thanks!

matteocontrini commented 5 months ago

@Eptagone could you release this? 🙏

It should be the same issue as in #75

Eptagone commented 5 months ago

Done with f87721758e3871644f13570db429f26acf75cbb4