Do you want to request a _feature_ or report a _bug_?
bug report
What is the current behaviour?
When only changing css in the project it first hotreloads the project, then hits a 404 and reloads the page
If the current behaviour is a bug, please provide the steps to reproduce.
npm run dev What is the expected behaviour?
For it to only hotreload css
Please paste the results of preact info here.
Environment Info:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
Binaries:
Node: 10.16.3 - C:\Program Files\nodejs\node.EXE
npm: 6.10.3 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.18362.449.0
npmPackages:
preact: ^10.1.0 => 10.1.0
preact-cli: ^3.0.0-rc.6 => 3.0.0-rc.6
preact-compat: ^3.19.0 => 3.19.0
preact-render-to-string: ^5.1.2 => 5.1.2
preact-router: ^3.1.0 => 3.1.0
I tried the steps couldn't reproduce the bug.
Can you try in a fresh repo and confirm if it happens there as well?
i can repro with:
npm install -g preact-cli@rc
preact create default test
cd test
go into the index.js and replace the css import to import './style/index.scss';
then
npm install --save-dev node-sass [email protected]
npm run dev
localhost:8080 in browser (used chrome)
do those steps work for you?
Sorry trying to carve time out for this one.
Same issue, not only with css but with other type of changes as well. First you see the change, and then it still reloads again.
@Inviz are you windows as well?
For me the issue persists across macOs Catalina and arch Linux
will take a look today
This is coming from --esm.
For immediate fix please use `--no-esm with watch.
@developit @ForsakenHarmony is it ok if watch work without esm?
Holy molly! it works now without --no-esm! Yahoo! Thank you @prateekbh
Most helpful comment
This is coming from
--esm.For immediate fix please use `
--no-esmwith watch.@developit @ForsakenHarmony is it ok if watch work without esm?