eiriklv / react-masonry-component

A React.js component for using @desandro's Masonry
MIT License
1.44k stars 145 forks source link

Error when add plugin #91

Closed TeodorKolev closed 7 years ago

TeodorKolev commented 7 years ago
./node_modules/react-masonry-component/lib/index.js
Module not found: Error: Can't resolve 'imports' in 'D:\Development\Help'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.
                 You need to specify 'imports-loader' instead of 'imports',
                 see https://webpack.js.org/guides/migrating/#automatic-loader-module-name-extension-removed
 @ ./node_modules/react-masonry-component/lib/index.js 2:44-69
 @ ./src/routes/scroll/Scroll.js
 @ ./src/routes/scroll/index.js
 @ ./src/routes/index.js
 @ ./src/router.js
 @ ./src/client.js
 @ multi babel-polyfill react-error-overlay react-hot-loader/patch webpack-hot-middleware/client?name=client&reload=true ./src/client.js
afram commented 7 years ago

This looks like a webpack config issue.

With webpack 2 you have to add 'loader' to the loader definition you use. So for example instead of imports you have to use imports-loader?...

As a side note though, you don't need this config anymore as a downstream dependency has fixed the issue.

The readme says it's deprecated. Are you finding that you need to use the imports loader?

afram commented 7 years ago

@TeodorKolev

I'm going to close this issue. Please feel free to reopen if needed :-)