New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@nodejs-loaders/css-module

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodejs-loaders/css-module

Extend node to support css modules via customization hooks.

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
7
250%
Maintainers
2
Weekly downloads
 
Created
Source

Nodejs Loaders: CSS Module

@node.js loaders logo

npm version unpacked size compatible node version(s)

Usage

$ npm i -D @nodejs-loaders/css-module
$ node --import @nodejs-loaders/css-module main.js

See README.md in the repository's root for more details.

Environment: test

Compatible APIs:

This loads the module as a plain-object of simple key-value pairs of the css specifiers like:

/* main.module.css */
#Bar {
  font-weight: bold;
}

.Foo {
  text-decoration: none

  .Baz { color: red }
}

.Qux .Zed {
  font-size: 1.1em;
}
import styles from 'main.module.css';

styles.Bar; // 'Bar'
styles.Baz; // 'Baz'
styles.Foo; // 'Foo'
styles.Zed; // 'Zed'

This ensures snapshots are unaffected by unrelated changes.

[!WARNING] This loader does not differentiate classes vs ids; thus duplicate names can create a last-wins conflict. For example #Foo and .Foo will result in just Foo: 'Foo'. This is unlikely to cause any real-world problems (and you probably shouldn't be doing this anyway).

Keywords

customization hooks

FAQs

Package last updated on 08 Nov 2025

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