preact-cli icon indicating copy to clipboard operation
preact-cli copied to clipboard

Preact watch all subdirectories

Open EliasTouil opened this issue 7 years ago • 10 comments

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

EliasTouil avatar May 12 '19 17:05 EliasTouil

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

ForsakenHarmony avatar May 13 '19 22:05 ForsakenHarmony

Same has started happening to me...

ericnewman avatar Jun 13 '19 16:06 ericnewman

@ericnewman A few days ago I tried it again and it worked 🤷‍♂ I wish you luck

EliasTouil avatar Jun 13 '19 16:06 EliasTouil

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

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

EliasTouil avatar Jun 13 '19 16:06 EliasTouil

force configure it?

I sadly have no idea how webpack handles it internally

ForsakenHarmony avatar Jun 13 '19 19:06 ForsakenHarmony

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

EliasTouil avatar Jun 13 '19 19:06 EliasTouil

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

ForsakenHarmony avatar Jun 29 '19 21:06 ForsakenHarmony

same happens to me...

prescientmoon avatar Dec 27 '19 09:12 prescientmoon

@Mateiadrielrafael do other webpack based projects work?

ForsakenHarmony avatar Jan 06 '20 04:01 ForsakenHarmony

@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.

dkolba avatar May 14 '20 10:05 dkolba