Build tool support for polymer projects

49 views
Skip to first unread message

Suren

unread,
Nov 10, 2014, 12:09:24 PM11/10/14
to polym...@googlegroups.com
What are some of the thoughts on how to architect a non-polymer project (say backbone/reactjs/angular) using multiple polymer components? The aim is to maintain light weight chunks of polymer core dependencies so that app can download them when needed and improve performance.

Use case: 

An application uses multiple polymer components but the application itself is using a framework like reactjs/angular/backbone. Thoughts on the below proposed bundling? 


app/
   - main.js (a self contained bundle using webpack kind of bundler)
   - polymer-core-dependencies.js (a bundle of common chunk of polymer core dependencies)
   - web-component1.js (a bundled polymer component without polymer core dependencies)
   - web-component2.js (a bundled polymer component without polymer core dependencies)

 
The entry point of app is main.js. When web-component1.js is included/referenced by the app its dependencies(polymer-core-dependencies.js) are loaded, similarly for other web components.


Question:

I looked at vulcanize it kind of bundles into a single html file with references to be available via a shared bower_components. The problem I am running into with this approach is upload all the bower_components to the server takes a long time due to the number of components  (we maintain a fresh copy of permanently cached components). I am thinking the above proposed bundling will allow to bundle chunks of polymer dependencies and downloaded only when required and only once for the app.

Reply all
Reply to author
Forward
0 new messages