-
Notifications
You must be signed in to change notification settings - Fork 12
Watch with multiple entry points #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @clechner77, Only the changed webpart Regarding JS/TS entry points and watch, this is how Webpack watches, before tracking incremental changes it has, in my knowledge, to build everything, otherwise, it's even not obvious how to track a change. Imagine a change in a JS which is imported in another JS which is imported... you got an idea. In projects with a larger code base and many entry points when build time is relevantly bloated and becomes not comfortable, especially as you know that within many only some entry points are at active development, there is a special parameter in sp-build-tasks which reduces the active entry points. Not sure that I documented this, but we use that parameter for scoping entry points all over the projects. To limit an entry point you can start gulp watch --webpack-targets=target1.js,target2.js Where |
This is EXACTLY what I was looking for. Thank you! I'm not sure if that parameter is documented. I looked around but probably missed it. |
Closing the issue. Documented in sp-build-tasks Wiki page. |
In my projects, I setup each webpart to have it's own entry point, a dedicated folder under SCRIPTS and a dedicated hbs file under WEBPARTS.
My issue is that if I run "gulp watch --prod" the first time a change is made and saved, it rebuilds ALL webarts/entry points. After that, however, it works how I would expect, only rebuilding the webpart/entry point for which the change is made. Note - I believe I did need to remove COPYASSETSMAP and any entries or else it does rebuild all after every change.
I wonder if it's possible to eliminate that first rebuild of all when starting watch?
The text was updated successfully, but these errors were encountered: