embroider-build / embroider

Compiling Ember apps into spec-compliant, modern Javascript.
MIT License
337 stars 136 forks source link

How to watch dependencies in Classic and Embroider #2129

Open simonihmig opened 4 days ago

simonihmig commented 4 days ago

This issue is for documenting how the different Ember build systems behave regarding watching the different types of dependencies, and potentially addressing any gaps.

Classic/eai Embroider/Webpack (stable) Embroider/Vite (main) Embroider/Webpack (future IoC)
v1 addon just works [^1] just works [^1] ? ?
v2 addon needs watchDependencies needs broccoli-side-watch ^2 just works ?
npm pkg needs watchDependencies needs broccoli-side-watch ^2 just works ?

[^1]: Used to need enabling isDevelopingAddon, but seems this enabled by default when canNestRoots is true (source)

ef4 commented 4 days 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.