Integrations
Set up Master CSS in Rspack
Guide to setting up Master CSS in your Rspack project.
Create a project
If you don't have a Rspack project, create one first.
npm create rspack@latest my-appcd my-appAdd Master CSS
Run the installer with --mode runtime from the project root. The browser runtime generates rules for class names that appear after the build.
npm create @master/css@rc -- --framework rspack --mode runtime --yesStart dev server
Run the command to start the Rspack dev server.
npm run devStart using Master CSS
Now style your first Rspack page using Master CSS syntax.
localhost:8080
Hello World
The installer registers the Webpack-compatible plugin in rspack.config.* and creates src/index.css as the Master CSS entry.
import MasterCSSPlugin from '@master/css-webpack'export default { module: { rules: [ { test: /\.css$/i, type: 'css/auto' } ] }, plugins: [ new MasterCSSPlugin({ mode: 'runtime' }) ]}@import '@master/css';<h1 class="m-2xl italic font-5xl font-heavy text-neutral"> Hello World</h1>