Open simonihmig opened 1 month ago
Embroider/Vite (main)
v1 Addon should work as long as we're using BROCCOLI_ENABLED_MEMOIZE the same way stable does, we should confirm that.
Embroider/Webpack (future IoC)
will just work.
v2 addon and npm under both Classic/eai and Embroider/Webpack (stable) could be made to work if we start integrating Webpack's watch mode inside the broccoli pipeline.
v2 addon and npm under both Classic/eai and Embroider/Webpack (stable) could be made to work if we start integrating Webpack's watch mode inside the broccoli pipeline.
@ef4 Have looked into that a bit, but failed to figure out how this can be done. Like when we hook into webpack's watch mode, we would need to make the broccoli tree that is wrapping the webpack build understand that something changed so that it rebuilds, right? But AFAICT how broccoli's watch mode works is that you mark specific input nodes as being watched (WatchedDir
), but the files changing that webpack is notifying us about are always outside of what is the broccoli input. So we basically need to tell broccoli that some files changed that are not covered by any input nodes, but it needs to rebuild anyway. But I don't see an API that would allow us to that? Or do I misunderstand?
Anyways, in the meantime I worked on https://github.com/embroider-build/embroider/pull/2141, which should make broccoli-side-watch
work as easy as watchDependencies
, so both APIs are at par. And maybe "good enough" to make the above mentioned approach not being worth the effort, given that next-gen Embroider will just work already!?
This issue is for documenting how the different Ember build systems behave regarding watching the different types of dependencies, and potentially addressing any gaps.
watchDependencies
broccoli-side-watch
^2watchDependencies
broccoli-side-watch
^2[^1]: Used to need enabling
isDevelopingAddon
, but seems this enabled by default whencanNestRoots
is true (source)