@regru/bem-loader

1.1.3 • Public • Published

Bem-loader

Yet another webpack loader

Usage

Configure:

Loader required following params:

context: 'path/to/modules/root',
bem: {
    /**
     * levels should be string or array of strings
     */
    levels: [
        'path/to/first/level',
        'path/to/second/level',
        ...,
    ],
    extensions: [
        'deps.js',
        'less',
        'js',
    ],
    elemDelim: '__' // optional, default '__'
    modDelim: '_' //optional, default '_',
    strict: false //optional, default false. throws if no files is found
},

Warning

If loader will find duplicate bem block in different folders e.g. path/to/b-block.js and different/path/to/b-block.js it will use only the first occurences in order of levels array. Look for source in ./libs/search.js.

Readme

Keywords

Package Sidebar

Install

npm i @regru/bem-loader

Weekly Downloads

1

Version

1.1.3

License

MIT

Unpacked Size

15 kB

Total Files

21

Last publish

Collaborators

  • dskvr91
  • daniilkadm
  • yushkov.vladimir
  • dreamworker
  • podkot