1.1.0 • Published 1 year ago

@nodejs-loaders/css-module v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Nodejs Loaders: CSS Module

npm version unpacked size

Environment: test

Compatible APIs: module.register

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).

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago