Closed niieani closed 8 years ago
@EisenbergEffect We are using text
plugin for bundling views as our loader
expect. And, unfortunately it does not support minification (the plugin will never support that as it has no idea about the actual content). We, on the other hand, know the content type(html/css). Given that bundle the configurations looks like:
includes: [
''**/**/*.html!text"
''**/**/*.cssl!text"
]
We may pre-expand the globs
with specific file extensions .html/.css
and process them (minify) and then hand over to systemjs-bundler
one by one.
Thoughts?
@ahmedshuhel Absolutely. If we can build html and css minification into the bundling process, that would be great.
As a more general idea, perhaps the bundler should have certain types of plugins that it can apply, based on file extension or something like that. I'm thinking of an extensibility point. This is something we could hook our view pre-compile into, but also someone else may want to hook a sass or less compiler into...or any other type of transformation.
After you finish your current round of improvements on the bundler, I'd like you to consider if there is a general design improvement we could make that would enable all these scenarios.
@EisenbergEffect SystemJS
plugins could do that
I suppose it could be done with a systemjs plugin. However, wouldn't that affect the module id? We don't want to create a discrepancy between the module id that is encoded into the bundler and the one that is used at runtime. We also don't want different module ids for bundled vs. unbundled apps. That would be my only concern. @ahmedshuhel knows more about how the builder process works though, so maybe it's not an issue and we can just use them...or if not, maybe we can use the same api, but run them ourselves so they don't affect the module ids.
I would like to let everybody know that we are working on it. Already made some great progress. Hope to get it in in the next version.
View-Templates are not minified during bundling, even though
minify
is set to true.