solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

Issue with File Updates on Dev Server

Open vlamirand opened this issue 1 year ago • 1 comments

Describe the bug

When using the solid template with the with-tailwindcss option, as provided by the command bun create solid, there are issues with automatic file updates on the dev server. The problem manifests as follows:

Issues Encountered:

  • Automatic page updates only work for some files.
  • For example, after modifying the about page file, the page does not update automatically or upon manual refresh. Changes are visible only after navigating to another page and back.
  • Creating and modifying other files, such as src/routes/api/products.js, does not lead to data updates on the page. Changes take effect only after restarting the dev server.

Example code

https://github.com/vlamirand/Issue-dev

Steps to Reproduce the Bug or Issue

  1. Run bun create solid and select the with-tailwindcss option.
  2. Run bun install and bun dev.
  3. Modify the page file, e.g., src/routes/about.jsx.
  4. Refresh the page in the browser and check if the changes are reflected.
  5. Create a new API file, e.g., src/routes/api/products.js with the following content:
export async function GET({ params }) {
  const products = { id: 1, name: 'rrffff222oo11232323232323' };
  return products;
}
  1. Modify the name value in products.js.
  2. Make a request to the API and check if the value is updated.

Expected behavior

File changes should automatically reflect on the page without the need to restart the dev server.

Platform

  • OS: [Linux (wsl Ubuntu)]
  • Browser: [Chrome]
  • Version: Vinxi: v0.3.12 Bun: v1.1.17

!

On Windows, everything works fine with the same steps: bun install and bun dev.

vlamirand avatar Jun 27 '24 16:06 vlamirand

Hello, I cloned your repo and followed your instructions and was unable to reproduce on Windows using bun.

I tried again with bun on Ubuntu WSL, and I couldn't get it to run at all.

I suspect this is an issue with your environment or bun.

doeixd avatar Jun 28 '24 15:06 doeixd