catamphetamine / universal-webpack

Isomorphic Webpack: both on client and server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack 2 support

cyberwombat opened this issue · comments

Hi. Does this work with Webpack 2?

It should

On Friday, October 14, 2016, Yashua notifications@github.com wrote:

Hi. Does this work with Webpack 2?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#35, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAdH74TBY8-R2VizQ-39js1ER5rlzZoDks5qzrFcgaJpZM4KWc5K
.

It should

Just tested it and throws an error if you use the new syntax for loaders:

module: {
  rules: {
    ...
  }
} 

intead of the old v1 way:

module: {
  loaders: {
    ...
  }
} 

The top of the error stack trace shows us the line where a check is made in the module

// line 11 in source/loaders.js
for (let loader of configuration.module.loaders)
{
...

The error:

TypeError: undefined is not iterable!
at module.exports.require.getIterator (/<project_path>/node_modules/core-js/library/modules/core.get-iterator.js:5:40)
at find_style_loaders (/<project_path>/node_modules/universal-webpack/source/loaders.js:11:2)
.....

Webpack 2 still supports the old syntax btw....

@heliosophist fixed in the latest release

FYI the newest 0.2.0 release now only supports Webpack 2.
It works for my project.
If you find any bugs in the new version then create an issue.