generator-jam3 icon indicating copy to clipboard operation
generator-jam3 copied to clipboard

First config add for webpack release and dev server

Open jeremenichelli opened this issue 8 years ago • 7 comments

🔴 NOT READY FOR MERGING YET 🔴

ISSUE 👉 https://github.com/Jam3/generator-jam3/issues/331

This pull request contains all the configuration to run our projects under webpack, so far it's making half of our scripts obsolete and bundles are smaller by default thanks to scope hoisting, tree shaking and better modules overhead.

TODO:

  • Test with BigWheel project
  • Add support for LESS styles
  • Discuss ASSETS_PATH variable use

jeremenichelli avatar Jul 21 '17 22:07 jeremenichelli

@jeremenichelli 👍 respect I will def take a look on Monday. but a little thought: I don't think we need to support bigwheel and less, at least for now. I personally don't think we are using them for most of the projects.

neo avatar Jul 21 '17 23:07 neo

The other thing is the team might want to use it as an option for now? Instead of replacing budo? I don't know...

neo avatar Jul 21 '17 23:07 neo

@neo I think that adding LESS support is super easy so that wouldn't be a problem. DOn't know the way we want to go on BIg Wheel but I wouldn't kill it under this PR.

Mainting budo and webpack on the same template is possible I think though a bit more complicated ot me since I don't have much experience doing heavy modifications to the generator but if that's the way the team wanna go I will change the PR for sure, just let me know :)

jeremenichelli avatar Jul 22 '17 14:07 jeremenichelli

@jeremenichelli I'm not saying to kill them, I am just saying we don't have to support them at least for now.

And for sure, I know it's not gonna be easy. It will be a long way to go. But this is def a great first step! 👍

neo avatar Jul 22 '17 14:07 neo

Just one thought: should we just use https://github.com/facebookincubator/create-react-app?

neo avatar Aug 03 '17 17:08 neo

@neo it could be useful for some projects, the problem is that is hard to scalate the config I heard. So if you want to create specific vendor files or add some complex loader config you might have problems, and that happens really often in Jam3 projects.

jeremenichelli avatar Aug 04 '17 13:08 jeremenichelli

@jeremenichelli You are right, that was just a thought anyway. We always use custom builds, but what we could do is refer to how they do it I guess and get something useful out of it.

neo avatar Aug 04 '17 13:08 neo