Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/regru/bem-loader
https://github.com/regru/bem-loader
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/regru/bem-loader
- Owner: regru
- Created: 2017-07-25T16:51:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T23:20:44.000Z (almost 2 years ago)
- Last Synced: 2024-08-09T12:28:45.559Z (5 months ago)
- Language: JavaScript
- Size: 480 KB
- Stars: 1
- Watchers: 22
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Bem-loader
==========Yet another webpack loader
### Usage
Configure:
Loader required following params:
```javascript
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`.