Closed iniel closed 7 years ago
@iniel why you need block inside its element?
@awinogradov I need block's modifier inside an element. The use case is somewhat complex to give the full context here, however it's irrelevant anyway, because the issue is the unexpected behaviour. When I use short syntax, I expect loader complete it. When I use full syntax, I expect to get the entity exactly as it was explicitly specified.
@iniel ok, can you make PR to examples with your use case? it's the way to understand and solve this problem.
done https://github.com/bem/webpack-bem-loader/pull/15
webpack ./entry.js bundle.js
ERROR in ./common.blocks/page/__content/page__content.js
Module build failed: Error: No BEM entity: "page__content_theme_normal"
at /Users/sekolosova/Documents/MakeUp/react/webpack-bem-loader/index.js:71:39
at Array.reduce (native)
at /Users/sekolosova/Documents/MakeUp/react/webpack-bem-loader/index.js:69:64
at Array.<anonymous> (/Users/sekolosova/Documents/MakeUp/react/webpack-bem-loader/node_modules/vow/lib/vow.js:713:56)
at Immediate.callFns [as _onImmediate] (/Users/sekolosova/Documents/MakeUp/react/webpack-bem-loader/node_modules/vow/lib/vow.js:24:35)
at processImmediate [as _immediateCallback] (timers.js:383:17)
@ ./entry.js 2:28-153 3:31-156 4:31-156
Thanks! :fire:
Example: _page_content.react.js
--> { block: 'b-page', elem: 'content', modName: 'theme', modVal: 'normal' }