foundation / foundation-sites

The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
https://get.foundation
MIT License
29.65k stars 5.48k forks source link

[Foundation 7] Move fully to webpack! - Not half like current #10714

Closed IamManchanda closed 6 years ago

IamManchanda commented 7 years ago

Reason: All these app frameworks now use/supports webpack

  1. Angular - https://angular.io/guide/webpack
  2. React - https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel
  3. Vue - Well here its awesome actually
DaSchTour commented 7 years ago

Maybe we should get rid of gulp and webpack and try to make the build environment as small as possible?

IamManchanda commented 7 years ago

(If you ask me personally) Being loving Vue and Webpack day by day This is the last thing I would like!

IamManchanda commented 7 years ago

Webpack is the present and future of module bundling.

DaSchTour commented 7 years ago

I guess the future of module bundling is no module bundling at all

IamManchanda commented 7 years ago

I don't agree! Maybe because I like webpack simplicity!

DaSchTour commented 7 years ago

And I don't see any simplicity in webpack 🤣

marvinhuebner commented 7 years ago

If we move completly to webpack, will panini also migrated to webpack?

Currently this is the biggest blocker for me to fully move because i love panini for prototyping and simple html pages.

Maybe @gakimball can help here.

gakimball commented 7 years ago

If we move completly to webpack, will panini also migrated to webpack?

Do you mean making a Webpack loader for it?

It's possible, but I don't know that the entire library can be overloaded to support the Webpack model of importing files. For example, in Panini, if you create a partial at src/partials/nav.js, it's available as just {{> nav }}. Contrast this with the Webpack loader for Handlebars, handlebars-helper, which uses Webpack's full module resolution system to manage loading helpers.

On top of that, since the HTML files are likely the Webpack entries, you'd probably also want loaders to pull in images, CSS, JS, etc. referenced in the HTML, at least assuming you want the entire build process to be Webpack-based.

I might be misunderstanding something, but I think that's a completely different library from Panini. It's definitely possible to build, although I don't have enough Webpack experience to be the one to build it.

IamManchanda commented 7 years ago

cc @thelarkinn ... Can you help us a bit sir ;)

IamManchanda commented 7 years ago

Sharing this link which makes my case more solid https://wptavern.com/wordpress-replaces-browserify-with-webpack-for-build-process

DaSchTour commented 7 years ago

I remember the times everybody used bower for frontend dependencies 😉 Sorry but do not over estimate such things. Frontend technology moves that fast.

phifa commented 6 years ago

@IamManchanda is it possible to move fully to webpack? less dependencies makes sense to me.

IamManchanda commented 6 years ago

@DaSchTour Just had the poll in my circle and here's what they thought about Webpack - see below I really think webpack is easy and should be the default stuff I don't think it's confusing cc @ncoden

screen shot 2018-01-22 at 2 24 08 am
ncoden commented 6 years ago

@IamManchanda This study seems to have a lot of biais.

IamManchanda commented 6 years ago

@ncoden But still do you really think we should not move to webpack??

on the top of Foundation 7 webpack template we can make various webpack templates for various technologies like angular, react, vue, laravel, wordpress etc etc and ship it over

Kind of https://github.com/vuejs-templates

IamManchanda commented 6 years ago

Then user can simply do this below and boom

foundation-cli init webpack-vue 

PS: Swap vue with your platform of choice

ncoden commented 6 years ago

Yeah, we could switch to webpack. I have nothing against that.

phifa commented 6 years ago

If we switch to webpack, we need to create resources on how to properly work with foundation and webpack. I am almost daily running into problems. Otherwise many folks will pick BS or other frameworks that are easier to adopt and we loose people. That would suck. At this point the framework is called "foundation" and not "foundation+webpack". Again, I see the advantages of webpack, but we need to make sure to give examples, docs, tutorials, etc.

kuzvac commented 6 years ago

And make webpack loader or something for panini :D

IamManchanda commented 6 years ago

@phifa @ncoden Well there is a short course on udemy. (Yup that 10$ beast) https://www.udemy.com/webpack-beyond-the-basics/

The author of that tutorial Lawrence, apart from being a web developer is a film maker too and thus has made a great resource for learning webpack with ease, a point to point course without any time wastage. If we can add that link in the docs for same or resources then that will be great

or else, if we can't pitch in some paid course then well there is a free course https://webpack.academy/ by the creator of Webpack that we can add as a resource or both of them

marvinhuebner commented 6 years ago

I think if we move to webpack it won't heart newbies from using foundation if we have good toolset around. We should don't remove the basic template. So the basic template will use simple html/css/js without the need of any tooling and the zurb (advanced) template should prepared with a working webpack configuration.

So if anybody who has not much knowladge about webpack but will use the sass version of foundation will simply use the zurb (advanced) template. And if npm start and npm run build works out of the box it should be no big thing for anybody who is not really into these topics to use foundation with sass etc..

And if we move to webpack it there should be an officially panini-loader for webpack.

DaSchTour commented 6 years ago

I don't like were this discussion is heading. Webpack should be used as an internal toolset to create a distribution build that can be used with all other toolsets. The worst a framework could to to chain itself to a certain build tool and force others to use a certain toolchain just to use a certain framework.

brettsmason commented 6 years ago

I tend to agree with @DaSchTour on this. The good thing about Foundation is its flexible in how the user wants to work and we don't force a way of working upon them.

IamManchanda commented 6 years ago

We should don't remove the basic template. So the basic template will use simple html/css/js without the need of any tooling and the zurb (advanced) template should prepared with a working webpack configuration.

So if anybody who has not much knowladge about webpack but will use the sass version of foundation will simply use the zurb (advanced) template. And if npm start and npm run build works out of the box it should be no big thing for anybody who is not really into these topics to use foundation with sass etc..

And if we move to webpack it there should be an officially panini-loader for webpack.

I agree


Webpack should be used as an internal toolset to create a distribution build that can be used with all other toolsets. The worst a framework could to to chain itself to a certain build tool and force others to use a certain toolchain just to use a certain framework.

I don't agree Reason: Check I agree

IamManchanda commented 6 years ago

V7 requests are being closed for the time being. We have them labeled so we can readdress them in the future.