JSPM

split-css-rspack-plugin

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q14670F
  • License MIT

a plugin for split css

Package Exports

  • split-css-rspack-plugin
  • split-css-rspack-plugin/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (split-css-rspack-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

split-css-rspack-plugin

Install

npm i --save-dev split-css-rspack-plugin

Features

  • Use postcss to split css file
  • Parse css in various files besides html
  • Multiple configuration options
  • Use purgecss clean css

Usage

import { defineConfig } from "@rsbuild/core";
import { pluginReact } from "@rsbuild/plugin-react";
import { SplitCssPlugin } from "split-css-rspack-plugin";

export default defineConfig({
  plugins: [pluginReact()],
  tools: {
    rspack: {
      plugins: [new SplitCssPlugin({ cssFileNum: 5 })],
    },
  },
});