Go to file
Valentin Silytuin bab392fb87 Fix version number 2024-05-29 01:02:06 +04:00
.vscode v0.0.1 2024-05-29 01:01:14 +04:00
.yarn v0.0.1 2024-05-29 01:01:14 +04:00
.editorconfig v0.0.1 2024-05-29 01:01:14 +04:00
.gitattributes v0.0.1 2024-05-29 01:01:14 +04:00
.gitignore v0.0.1 2024-05-29 01:01:14 +04:00
.npmignore v0.0.1 2024-05-29 01:01:14 +04:00
.nvmrc v0.0.1 2024-05-29 01:01:14 +04:00
.prettierignore v0.0.1 2024-05-29 01:01:14 +04:00
.yarnrc.yml v0.0.1 2024-05-29 01:01:14 +04:00
README.md v0.0.1 2024-05-29 01:01:14 +04:00
index.js v0.0.1 2024-05-29 01:01:14 +04:00
package.json Fix version number 2024-05-29 01:02:06 +04:00
prettier.config.js v0.0.1 2024-05-29 01:01:14 +04:00
yarn.lock v0.0.1 2024-05-29 01:01:14 +04:00

README.md

lightningcss-loader

Lightning CSS loader for Webpack

Usage

import { transform } from 'lightningcss';

return {
    ...,
    rules: [
        {
            test: /\.css$/,
            use: [
                {
                    loader: '@advdominion/lightningcss-loader',
                    options: {
                        implementation: transform,
                    },
                },
            ],
        },
    ],
};

Passing options to Lightning CSS

import { transform } from 'lightningcss';

return {
    ...,
    rules: [
        {
            test: /\.css$/,
            use: [
                {
                    loader: '@advdominion/lightningcss-loader',
                    options: {
                        implementation: transform,
                        drafts: {
                            customMedia: true,
                        },
                        minify: false,
                    },
                },
            ],
        },
    ],
};