craco-stylus-loader
v1.1.2
Published
craco-stylus-loader allows to use stylus with create-react-app and Craco
Downloads
409
Readme
craco-stylus-loader
Stylus plugin for Craco.
Allows using Stylus .styl files in create-react-app 4.x and also works with the craco-antd plugin.
- CSS Module imports:
import styles from "./App.module.styl"; - Global imports:
import "./App.module.styl";
Getting started with create-react-app
$ create-react-app my-app
$ cd my-app
$ yarn add @craco/craco stylus stylus-loader craco-stylus-loaderpackage.json
"scripts": {
- "start": "react-scripts start",
+ "start": "craco start",
- "build": "react-scripts build",
+ "build": "craco build",
- "test": "react-scripts test",
+ "test": "craco test",
},craco.config.js
const CracoStylusLoaderPlugin = require("craco-stylus-loader");
module.exports = {
plugins: [
{
plugin: CracoStylusLoaderPlugin
}
]
};