Skip to content

Replace rollup with webpack - #577

Merged
sindresorhus merged 7 commits into
masterfrom
webpack-plz
Jul 5, 2017
Merged

sindresorhus merged 7 commits into
masterfrom
webpack-plz

Conversation

@fregante

@fregante fregante commented Jul 5, 2017 •

Copy link
Copy Markdown
Member

I was growing tired of rollup's over-modularity, so I thought of just using webpack.

Pros:

  • shows each bundle's size and can show which module is too heavy
  • faster builds: 500ms vs 1000ms.
    In watch mode the difference is higher and with sourcemaps enable the difference is 6x.
  • fewer bugs
  • ironically shorter config

Cons:

  • bundle 10KB heavier (129KB vs 119KB)
  • requires an extra babel step on release to strip comments (otherwise it'd be 149KB)

fregante added 6 commits July 5, 2017 19:15
119KB -> 159KB
comments: false doesn’t seem to work
This reverts commit 5af2db3159fe799acccc822d816654b2ac4ab597.
@fregante fregante added the meta Related to Refined GitHub itself label Jul 5, 2017
Comment thread package.json
"build": "webpack",
"watch": "webpack --watch",
"watch:sourcemap": "webpack --watch --devtool eval-cheap-module-source-map",
"reduce-size": "babel --out-dir . --no-comments extension/*.js",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this in the webpack config instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see you originally had that, why did you revert it?

bd8b1a6

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just wasn't applied :(

It might be a babel or babel-loader bug. That'd be its right place

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use webpack.optimize.UglifyJsPlugin to strip comments?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No ES6 support :(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah true. That's weird how the options weren't working though. Maybe babelrc: false needs to be explicitely specified despite not existing anyway? Might be worth considering using babili too.

@sindresorhus

Copy link
Copy Markdown
Member

Discovered a weird problem. On master the "Hide other users starring/forking your repos" setting is checked for me, but when running this PR it's not.

@fregante

fregante commented Jul 5, 2017

Copy link
Copy Markdown
Member Author

My bad. Part of an incomplete f393565. Fix coming

@sindresorhus
sindresorhus merged commit f304ff7 into master Jul 5, 2017
@sindresorhus
sindresorhus deleted the webpack-plz branch July 5, 2017 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

3 participants