- Notifications
You must be signed in to change notification settings - Fork2
nyancss/nyancss-css-modules-loader
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Nyan CSS webpack loader that converts CSS Modules (provided by css-loader) into components (React/Preact/Vue.js/etc.).
For the introduction into Nyan CSS and other docs, seethe main repo. Read further for instruction on setting up the loader.
npm install --save-dev @nyancss/css-modules-loader @nyancss/react# or using yarnyarn add --dev @nyancss/css-modules-loader @nyancss/reactnpm install --save-dev @nyancss/css-modules-loader @nyancss/vue# or using yarnyarn add --dev @nyancss/css-modules-loader @nyancss/vuenpm install --save-dev @nyancss/css-modules-loader @nyancss/class-names# or using yarnyarn add --dev @nyancss/css-modules-loader @nyancss/class-names// ...{test:/\.css$/,use:['style-loader','@nyancss/css-modules-loader/REPLACE_ME',// 👈 Add the loader// Use '@nyancss/css-modules-loader/react' for React// Use '@nyancss/css-modules-loader/preact' for Preact// Use '@nyancss/css-modules-loader/vue' for Vue// Use '@nyancss/css-modules-loader/class-names' for class names{loader:'css-loader',options:{modules:true}}]},// ...
Usage withmini-css-extract-plugin
// ...{test:/\.css$/,use:['@nyancss/css-modules-loader/REPLACE_ME',// 👈 The loader **before** the plugin{loader:MiniCssExtractPlugin.loader},// 👈 mini-css-extract-plugin{loader:'css-loader',options:{modules:true}}]},// ...
- @nyancss/css-modules - the package used to convert CSS Modules to Nyan CSS.
- @nyancss/react - the package used to convert Nyan CSS to React/Preact components.
- @nyancss/vue - the package used to convert Nyan CSS to Vue.js components.
- @nyancss/class-names - the package used to convert Nyan CSS to class names functions.
Seethe changelog.
About
Nyan CSS webpack loader that converts CSS Modules into React/Preact components
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.