forcedotcom / lwc-dev-server-feedback

LWC Local Development
BSD 3-Clause "New" or "Revised" License
45 stars 10 forks source link

Changes to static resources aren't rebuilt to .localdevserver #22

Closed gbreavin closed 3 years ago

gbreavin commented 4 years ago

Describe the bug If I edit a static resource in a project folder, there is activity in the terminal, and the browser refreshes. However, the change is not reflected in the browser, because the files in the .localdevfolder are not rebuilt.

To Reproduce Requires a component that uses a static resource - I used an image.

  1. Load the component on the local dev server
  2. Make a change to the static resource that will result in a change that can be seen in the browser - for example, if the resource is an image, modify the image contents
  3. Wait for the browser to refresh
  4. Note that the change is not reflected
  5. Look at the static resource in the .localdevserver - note that the

Expected behavior The file should be rebuilt to the .localdevserver folder so that when the browser refreshes, changes are shown.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Possible dupe of #4 ?

stale[bot] commented 4 years ago

This issue has been automatically marked as type:bug-p3 because it has not had recent activity.

git2gus[bot] commented 4 years ago

This issue has been linked to a new work item: W-7299193

JimmyBarzmark commented 4 years ago

I have the same issue.

When loading a static resource css with loadStyle(); changes to the css do not take effect until the localhost:3333 is stopped and re-launched. This defeats the purpose of the hot reload.

stale[bot] commented 4 years ago

This issue has been automatically marked as type:bug-p3 because it has not had recent activity.

sfsholden commented 3 years ago

Closing. This feature has been implemented as part of release 2.8.0.

Note that file changes will cause a reload, however file additions and deletions from the static resources folder will still not cause a reload of the project at this time. However, there are workarounds that do not require a restart of the server.

Workarounds: 1) Any edit to a .js or .html file from within the component should cause a recompilation, which will regenerate the static resources. 2) Disable browser cache. Here is an example of what this would look like from Google Chrome - https://www.technipages.com/google-chrome-how-to-completely-disable-cache.