Conversation
…an work. Otherwise, webpack doesnt see any file paths that should be watched if build isnt required
…nagement/caching/minification
|
@loppear can you review the latest changes? Updated to use template level caching for includeScript, so that a single dependency tree for multiple components is created. Obviously, this only works if components are using the same template name to include under - maybe we consider a single clientjs include file on production? |
loppear
left a comment
There was a problem hiding this comment.
Hmm. This bundleByTemplate seems liable to reintroduce the inefficiency that #27 tried to remove of proliferating output duplicates by templateName. But, doing it by script name assumes that the application can be structured with entry point scripts that include/import the relevant dependencies for a bundle. Is there a change in how we're doing react or reusable or granular includes that makes that invalid?
|
That is, this helps with N If we need both approaches, I'd lean towards a separate config not call-time (this decision is definitely application-specific) for how bundles should be written, which could include by script, by template, all-in-one. Or perhaps this byTemplateName is overloading template as a standin for a new argument/name that allows the bundleEntry approach but across unaware modules. |
|
@loppear main difference is that |
|
I'm pretty sure that's not a difference, for the case that 27/entry-point script was addressing, and that this would regress? I get this is automatically doing the consolidation that an entry point script does, for the case where template-name == bundle, but I think the benefit of that is limited to your particular structure? |
|
@mjreich but if I'm confused about whether this regresses, and it actually just moves us closer to all-in-one rather than partitioning by template name, all good. |
|
Time to revisit, this is published but still not right, probably there's a combination of #29 and the removal of the |
Added chokidar to replace webpack watching so that the cache plugin can work. Otherwise, webpack doesnt see any file paths that should be watched if build isnt required.
@loppear would appreciate your eyes on this given its a bit of a rewrite.