Добрый день. Есть такой пробный проект: https://github.com/joshuan/integrate-webpack-bem-loader Сборка его собирается нормально:
$ webpack
Hash: 3819d0b165d22e9cf6d0
Version: webpack 2.7.0
Time: 1075ms
Asset Size Chunks Chunk Names
bundle.js 158 kB 0 [emitted] main
[0] ./~/process/browser.js 5.42 kB {0} [built]
[5] ./~/object-assign/index.js 2.11 kB {0} [built]
[7] ./~/react/lib/canDefineProperty.js 661 bytes {0} [built]
[8] ./blocks/logo/logo.js 2.3 kB {0} [built]
[11] ./~/react/lib/lowPriorityWarning.js 2.16 kB {0} [built]
[14] ./~/react/lib/ReactBaseClasses.js 5.44 kB {0} [built]
[25] ./~/react/lib/React.js 5.08 kB {0} [built]
[26] ./~/react/lib/ReactChildren.js 6.19 kB {0} [built]
[27] ./~/react/lib/ReactDOMFactories.js 5.48 kB {0} [built]
[29] ./~/react/lib/ReactPropTypes.js 500 bytes {0} [built]
[31] ./~/react/lib/ReactVersion.js 350 bytes {0} [built]
[33] ./~/react/lib/createClass.js 688 bytes {0} [built]
[34] ./~/react/lib/onlyChild.js 1.34 kB {0} [built]
[36] ./~/react/react.js 56 bytes {0} [built]
[37] ./src/index.js 307 bytes {0} [built]
+ 23 hidden modules
Но стоит лишь добавить redux: https://github.com/joshuan/integrate-webpack-bem-loader/pull/1 то сборка рушится. Один в один в другую сторону - при живом redux, подключая webpack-bem-loader: https://github.com/joshuan/integrate-webpack-bem-loader/pull/2
$ webpack
Hash: f8c94748da0b23692e0f
Version: webpack 2.7.0
Time: 1455ms
Asset Size Chunks Chunk Names
bundle.js 159 kB 0 [emitted] main
[3] ./~/react/lib/ReactElement.js 11.2 kB {0} [built]
[5] ./~/object-assign/index.js 2.11 kB {0} [built]
[7] ./~/react/lib/canDefineProperty.js 661 bytes {0} [built]
[8] ./blocks/logo/logo.js 2.32 kB {0} [built]
[11] ./~/react/lib/lowPriorityWarning.js 2.16 kB {0} [built]
[14] ./~/react/lib/ReactBaseClasses.js 5.44 kB {0} [built]
[25] ./~/react/lib/React.js 5.08 kB {0} [built]
[27] ./~/react/lib/ReactDOMFactories.js 5.48 kB {0} [built]
[29] ./~/react/lib/ReactPropTypes.js 500 bytes {0} [built]
[31] ./~/react/lib/ReactVersion.js 350 bytes {0} [built]
[33] ./~/react/lib/createClass.js 688 bytes {0} [built]
[34] ./~/react/lib/onlyChild.js 1.34 kB {0} [built]
[36] ./~/react/react.js 56 bytes {0} [built]
[37] ./~/redux/es/index.js 878 bytes {0} [built] [failed] [1 error]
[38] ./src/index.js 307 bytes {0} [built]
+ 24 hidden modules
ERROR in ./~/redux/es/index.js
Module build failed: SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (1:0)
at Parser.pp$4.raise (/Users/joshuan/www/_test/babel-webpack/node_modules/acorn/dist/acorn.js:2610:13)
at Parser.pp$1.parseStatement (/Users/joshuan/www/_test/babel-webpack/node_modules/acorn/dist/acorn.js:782:16)
at Parser.pp$1.parseTopLevel (/Users/joshuan/www/_test/babel-webpack/node_modules/acorn/dist/acorn.js:690:23)
at Parser.parse (/Users/joshuan/www/_test/babel-webpack/node_modules/acorn/dist/acorn.js:543:15)
at parse (/Users/joshuan/www/_test/babel-webpack/node_modules/acorn/dist/acorn.js:3669:37)
at module.exports (/Users/joshuan/www/_test/babel-webpack/node_modules/falafel/index.js:22:15)
at Object.module.exports (/Users/joshuan/www/_test/babel-webpack/node_modules/webpack-bem-loader/index.js:43:20)
@ ./blocks/logo/logo.js 13:0-16
@ ./src/index.js