Move each package into examples with a package.json.
Move packages/polydev to src.
Running an example should require cd into that directory, yarn and polydev.
By doing this, we can ensure that hoisted modules don't affect development/examples.
Also, np will behave as expected.
[x] Use execa, because shelljs doesn't support colors.
[ ] delete require.cache[handlerPath] still needs to be fixed: when HMR fails, we need to delete the cached version. The problem with clearing it every single time is that the hits++ example breaks when we clear the cache. https://github.com/sidorares/hot-module-replacement/issues/15
Before #28 or #21, we can fix #14 by:
yarn workspaces
.yarn link
forpolydev
.package
intoexamples
with apackage.json
.packages/polydev
tosrc
.Running an example should require
cd
into that directory,yarn
andpolydev
.By doing this, we can ensure that hoisted modules don't affect development/examples.
Also,
np
will behave as expected.execa
, becauseshelljs
doesn't support colors.delete require.cache[handlerPath]
still needs to be fixed: when HMR fails, we need to delete the cached version. The problem with clearing it every single time is that thehits++
example breaks when we clear the cache. https://github.com/sidorares/hot-module-replacement/issues/15