fkling / astexplorer

A web tool to explore the ASTs generated by various parsers.
https://astexplorer.net/
MIT License
6.04k stars 711 forks source link

in the website/,`npm run watch` cannot observe the change of files #671

Closed raintoway closed 1 year ago

raintoway commented 1 year ago

Describe the bug in the website/,npm run watch cannot observe the change of files

To Reproduce Steps to reproduce the behavior:

  1. Go to website/
  2. npm i
  3. npm run start
  4. npm run watch
  5. open the browser,visite the http://127.0.0.1:8080
  6. change the source file
  7. refresh browser,can not view the change of relative file

Expected behavior refresh browser,can view the change of relative file

Screenshots

Browser (please complete the following information):

astexplorer settings:

Additional context Add any other context about the problem here.

raintoway commented 1 year ago

because u don't check the Disable cache option of browser,the app.js will be reload from browser's cache instead of network which is new

fkling commented 1 year ago

How are you serving the files? I.e. which webserver are you using? It should work with yarn start/npm run start. It uses the serve module which sets etags and properly "invalidates" a file (I just tested it).

raintoway commented 1 year ago

How are you serving the files? I.e. which webserver are you using? It should work with yarn start/npm run start. It uses the serve module which sets etags and properly "invalidates" a file (I just tested it).

  1. Go to website/
  2. npm i
  3. npm run start
  4. npm run watch
  5. open the browser,visite the http://127.0.0.1:8080
  6. change the source file
  7. refresh browser,can not view the change of relative file

so, the webserver is serve

fkling commented 1 year ago

Mmh, probably can't help you there since it works for me. Since there is a workaround by disabling caching files I'm going to close this. In the long run the way how development works is probably going to change anyway.