Preact-cli: Preact watch all subdirectories

Created on 12 May 2019  路  10Comments  路  Source: preactjs/preact-cli

First of all thanks a lot for all the good work on preact and preact cli, it looks like everything I need in life.


Do you want to request a _feature_ or report a _bug_?
I want to ask a question.

What is the current behaviour?
with create preact app, when I created my app, i was using this structure:

src
--index.js

--components
----app.js

----ComponentName
------index.js
------ComponentName.css

----Component2Name
------index.js
------Component2Name.css

When I use yarn dev ( Preact watch ),
Any saved change to files in components and src will trigger a re-build, any directory that is a children (ComponentName/index.js for example) will not.

What is the expected behaviour?
I would like all children of src to trigger a re-build. How can I configure my project to do so ?

If this is a feature request, what is motivation or use case for changing the behaviour?
It is slow to press ctrl-c and re-build every time I save.

Please mention other relevant information.

  • Node version 10.15.2
  • npm version XX
  • yarn version 1.12.3
  • Operating system OSX 10.14
  • CLI version ^2.1.0
  • Browser chrome
question upstream

Most helpful comment

Same has started happening to me...

All 10 comments

Hmm that's pretty weird, never had problems with that

Same has started happening to me...

@ericnewman
A few days ago I tried it again and it worked 馃し鈥嶁檪
I wish you luck

Hmm that's pretty weird, never had problems with that

@ForsakenHarmony
Leah, is there a way to 'force' configure this ?

force configure it?

I sadly have no idea how webpack handles it internally

@ericnewman, since this is fresh, did it maybe happen after a change to your preact.config.js ?

Gonna close this for now, because I'm not sure we can fix something about this

same happens to me...

@Mateiadrielrafael do other webpack based projects work?

@Mateiadrielrafael @ericnewman if you're on MacOS check upper-/lowercasing of actual folders and the corresponding imports in your code. The bundle compiles if these mismatch but hot reloading breaks.

Was this page helpful?
0 / 5 - 0 ratings