Socket
Socket
Sign inDemoInstall

@regru/bem-loader

Package Overview
Dependencies
Maintainers
5
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@regru/bem-loader

Webpack loader for BEM projects


Version published
Maintainers
5
Created
Source

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.

Keywords

FAQs

Package last updated on 29 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc