webpack-loader-rics
v0.3.16
Published
Webpack loader for rics CSS preprocessor
Maintainers
Readme
Webpack loader for the rics CSS preprocessor. Enables importing .rics files in Webpack projects.
Installation
npm install webpack-loader-ricsUsage
// webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.rics$/,
use: ["style-loader", "css-loader", "webpack-loader-rics"],
},
],
},
};Import .rics files in your code:
import "./styles.rics";Options
{
test: /\.rics$/,
use: [
"style-loader",
"css-loader",
{
loader: "webpack-loader-rics",
options: {
minify: false,
timeout: 5000,
maxIterations: 10000,
},
},
],
}| Option | Type | Default | Description |
|--------|------|---------|-------------|
| minify | boolean | false | Minify compiled CSS |
| timeout | number | 5000 | Max compilation time (ms) |
| maxIterations | number | 10000 | Max loop iterations |
With CSS Extraction
For production builds with extracted CSS:
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
plugins: [new MiniCssExtractPlugin()],
module: {
rules: [
{
test: /\.rics$/,
use: [
MiniCssExtractPlugin.loader,
"css-loader",
"webpack-loader-rics",
],
},
],
},
};License
MIT
Built by Better Lyrics
