Live data from Hacker News

Webpack 2, RC 7

github.com

1–10 of 28 posts

Re: Webpack 2, RC 7

#4

What features does Webpack 2 offer over Webpack 1?

My favorite change is how configuration has been clarified. For example, see how loaders are configured now - instead of using a giant string delimited by special characters like this:

    'css-loader?modules-true!postcss-loader!sass-loader'
Loaders are configured with an ordered list:

    [
      {
        loader: 'css-loader',
        options: {
          modules: true
        }
      },
      {
        loader: 'postcss-loader'
      },
      {
        loader: 'sass-loader'
      }
    ]
It takes up way more space but it's also entirely clear what's happening.

More config changes are summarized here:

http://javascriptplayground.com/blog/2016/10/moving-to-webpa...

Re: Webpack 2, RC 7

#8
post #4

What features does Webpack 2 offer over Webpack 1?

My favorite change is how configuration has been clarified. For example, see how loaders are configured now - instead of using a giant string delimited by special characters like this: 'css-loader?modules-true!postcss-loader!sass-loader' Loaders are configured with an ordered list: [ { loader: 'css-loader', options: { modules: true } }, { loader: 'postcss-loader' }, { loader: 'sass-loader' } ] It takes up way more sp…

After having used both Webpack 1 and 2, my favorite feature is simply most of the insanity being gone.

I was hitting my head against my desk setting up npm and webpack 1 for almost 3 hours a couple of weeks ago. I then said fuck it, replaced them with yarn and webpack 2 respectively and all my issues were fixed.

Truly magical.

Re: Webpack 2, RC 7

#9

What features does Webpack 2 offer over Webpack 1?

System.import split-points for code splitting, generates bundles with dependencies for lazy loading by route (automatically code split react router routes). Should make progressive web apps and optimization easier.

Re: Webpack 2, RC 7

#10
post #4

What features does Webpack 2 offer over Webpack 1?

My favorite change is how configuration has been clarified. For example, see how loaders are configured now - instead of using a giant string delimited by special characters like this: 'css-loader?modules-true!postcss-loader!sass-loader' Loaders are configured with an ordered list: [ { loader: 'css-loader', options: { modules: true } }, { loader: 'postcss-loader' }, { loader: 'sass-loader' } ] It takes up way more sp…

[deleted]
Post reply on HN