OpenBudget / open-budget-frontend

Israeli budget web apps
19 stars 32 forks source link

343-reduce-the-need-of-webpack-alias #346

Closed MaaikeB closed 8 years ago

MaaikeB commented 8 years ago

fixed webpack alias issue

Bnaya commented 8 years ago

ping @akariv

pwalsh commented 8 years ago

Seems like a weird way to use webpack? Why not set a single entry point and require everything there. Example:

Bnaya commented 8 years ago

@pwalsh can you elaborate? It's a requirejs codebase that was transformed to work with webpack recently, and there are some patchworks around. The project do have single entry point, the main.coffee file open-budget/app/scripts/main.coffee

pwalsh commented 8 years ago

@Bnaya hmmm. Not sure what you gain, except pain, by using both. Looking at code should be quite trivial to port to CommonJS modules, get rid of require.js, and use Webpack with a simpler config.

Bnaya commented 8 years ago

That extra configs are not because of the AMD modules, but the location of the node_modules & bower_components webpack play very nicely with AMD as is

We are gradually working to simplify the project so we could simplify our webpack config, that PR is one of the steps.

Our next iteration would probably be ES6 (or typescript) I would love to hear your input in #299

pwalsh commented 8 years ago

So on #299 I'd very strongly suggest ES6, Webpack, and then gulp for extra tasks beyond what you use Webpack for :). I'd also say get rid of Bower completely and use npm for everything - I've been doing that for around 18 months and not looking back.

Still don't get why this PR has to look like this though, and sorry @akariv for the drive by commenting :)

Bnaya commented 8 years ago

@pwalsh look at #343