4 ms·
http2 may help you with that. Your tooling could also potentially inline the components too, you don't have to make an http request for each one. That fact that
by ehsanu1 11y ago
http2 may help you with that. Your tooling could also potentially inline the components too, you don't have to make an http request for each one. That fact that Vulcanize didn't work too well for you for whatever reason seems like something that shouldn't be terribly difficult to fix.
- BinaryIdiot 11y ago> That fact that Vulcanize didn't work too well for you for whatever reason seems like something that shouldn't be terribly difficult to fix. Maybe? I'm not sure. The vast majority of issues I had with Vulcanize stemmed from pathing changes. So say you're working on a component that exists at /components/mycomponent/mycomponent.html When you're referencing JavaScript, images, CSS, etc you typically assume you're at / but it doesn't work like that for everything. So you either have to setup a configurations so you have a universal prefix to use for everything or do everything relative to root (which at least in the environments I deployed into not really doable as the root could change). So the vulcanizer needs to understand and reroute everything within your component and since there is no way to override the way the browser fetches content you're left with trying to figure out everything to include and doing it via ajax (if you wanted to be automated about it). I'm not saying it's impossible but it seems difficult to do to the point where I don't know that that's the best path for web development to go down. I honestly can't remember some of the other issues I've run into. Mostly JavaScript errors from third party components and even other Polymer components but it's been about 6 months or so since I've used it. I'm sure Vulcanize has gotten better by now and I know Polymer has.
- Touche 11y agoHTML Imports are going away. I'm not sure the state of Polymer but my guess is that they will be removed eventually, so I wouldn't depend on a tool like Vulcanize being improved; it's a dead feature. Instead use a normal JavaScript module loader to load components and concat them the usual way. Don't use imports.
- spankalee 11y agoHTML imports allow you to bundle HTML, CSS, and Script and import them in one step. ES6 only handles the script part. We very much love HTML Imports on the Polymer team and they aren't going anywhere for us. I expect that when the ES6 modules loader spec is finalized it will be fully compatible with the underlying semantics of HTML imports, and they will work quite nicely together.
- Zikes 11y agoThere are several competing proposals for asset imports [1] any of which are viable. HTML Imports may persist, be supplanted by ES6 imports, or may otherwise survive in a different but similar form. Hell, I wouldn't be surprised if one day someone makes a web component to implement the current HTML Import spec using whatever the browser happens to support. [1] https://hacks.mozilla.org/2015/06/the-state-of-web-components/ https://hacks.mozilla.org/2015/06/the-state-of-web-component... (see: HTML Imports)