Minification and Vulcanization ought to be simplified

69 views
Skip to first unread message

esacc...@gmail.com

unread,
Dec 4, 2015, 8:36:17 PM12/4/15
to Polymer
I'd like to be able to use Polymer on a production environment, and Polymer has a nice shopping cart style, but it isn't ideal.

1. It only downloads individual components, unminified, and without their dependencies (bower makes this step easier, but all files are still unminified)
2. You end up with a couple <link rel="import" /> tags in the <head>, but they rely on multiple dependencies, resulting in numerous http requests (hence the need to vulcanize)
3. After vulcanizing, you need to minify it yourself

I hope someday soon I'll be able to check out my favourite elements to the shopping cart, and download 1-2 minified files for production use: (1) the polymer components vulcanized and minified, (2) webcomponentsjs - which I understand must be loaded outside of the polymer components. 

Eric Bidelman

unread,
Dec 4, 2015, 9:06:53 PM12/4/15
to esacc...@gmail.com, Polymer
The a la carte nature of web components means you only need to load the components you need. If someone only wants to use a paper-button on their page, why should they be forced to request a vulcanized build of all the minified components? How would this work in practice?

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/1e20a3e1-5335-4d00-bc4e-819b3fcfaa5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

esacc...@gmail.com

unread,
Dec 4, 2015, 9:17:31 PM12/4/15
to Polymer, esacc...@gmail.com
Thanks for your reply. I forgot that Polymer was designed to be modular in case others want to use a mix of components from different vendors. I guess for now I need to figure out grunt in order to minify my vulcanized components. 

Daniel Freedman

unread,
Dec 4, 2015, 9:34:53 PM12/4/15
to esacc...@gmail.com, Polymer
If you want a simple build setup, we provide an all-in-one minification tool for gulp called polybuild: https://www.npmjs.com/package/polybuild.

You can also copy the gulp configuration of the Polymer Starter Kit: https://github.com/polymerelements/polymer-starter-kit

Reply all
Reply to author
Forward
0 new messages