jescalan / roots

a toolkit for rapid advanced front-end development
http://roots.netlify.com/
Other
1.45k stars 132 forks source link

npm modules in frontend #705

Closed janwirth closed 8 years ago

janwirth commented 8 years ago

I am having troubles using node modules in the frontend. I want to build an Angular2 app using roots. When I use browserify the compile process takes roughly 4 seconds which is not bearable. js-pipeline won't compile from node_modules. Transferring them manually does not seem to be the appropriate solution here. Did anyone tackle this yet?

jescalan commented 8 years ago

How big are the node modules you are loading? Browserify would only take that long if you are loading an absolutely massive amount of code. Take a look at your output file perhaps?

janwirth commented 8 years ago

Angular2 is just huge. I get multi-megabyte files. Thanks for the poke.

jescalan commented 8 years ago

You could always just go with a lighter framework :grin:

janwirth commented 8 years ago

I am going to build an E-Mail template editor. Do you recommend vue.js and have any experience with it? I saw it before and it looks really appealing. Thanks!

jescalan commented 8 years ago

Yes and yes. Use it with vue-resource and vuex for best results.

janwirth commented 8 years ago

Thanks, I will look into it. Had 2 solid days of angular2 PITA without any results.

jescalan commented 8 years ago

As far as I've seen, thats how things tend to be with angular

janwirth commented 8 years ago

I won't let angular get between roots and me :heart:

EnMod commented 8 years ago

Don't mean to butt in, but would either of you like to share your Roots/Vue.js setup? I'm learning Vue now and am curious as to the optimal setup with Roots.

jescalan commented 8 years ago

@EnMod I'm not doing anything special with it, just using it the recommended way with jade. I use vue-resource for connection with the server.

EnMod commented 8 years ago

Ah ok, was making sure there weren't any crazy caveats. Given that roots-mini will be using a Webpack core, I'm assuming Vue single file components might be usable within that ecosystem?

jescalan commented 8 years ago

@EnMod yes, already working there 😁

EnMod commented 8 years ago

Ah I see! Looks like I need to step it up :+1:

janwirth commented 8 years ago

No magic in my setup either, I restructure the application as I go. Usually I use it with roots-browserify to integrate with npm, but that's it.

EnMod commented 8 years ago

Very cool! Now if only I could understand why it is throwing this Webpack failed to add entry for error on my files...

jescalan commented 8 years ago

Better to ask in http://gitter.im/jenius/roots. If that's happening something is likely severely misconfigured. Did you generate a new template to start? I'd start with that!