Installation
Rspack 프로젝트에서 Tailwind CSS 설정하기.
아직 프로젝트를 설정하지 않았다면 새로운 Rspack 프로젝트를 생성하세요. 가장 일반적인 방법은 Rspack CLI를 사용하는 것입니다.
npm create rspack@latest@tailwindcss/postcss와 그에 필요한 의존성을 설치하세요.
npm install tailwindcss @tailwindcss/postcss postcss postcss-loaderrspack.config.js 파일에서 PostCSS 로더를 활성화하세요. 자세한 내용은 문서를 참고하세요.
export default defineConfig({  // ...  module: {    rules: [      {        test: /\.css$/,        use: ["postcss-loader"],        type: "css",      },      // ...    ],  },}프로젝트 루트에 postcss.config.mjs 파일을 생성하고 PostCSS 설정에 @tailwindcss/postcss 플러그인을 추가하세요.
export default {  plugins: {    "@tailwindcss/postcss": {},  },};./src/style.css에 Tailwind CSS를 임포트하는 @import를 추가하세요.
@import "tailwindcss";npm run dev로 빌드 프로세스를 실행하세요.
npm run devTailwind의 유틸리티 클래스를 사용해 콘텐츠를 스타일링하세요.
<template>  <h1 class="text-3xl font-bold underline">    Hello world!  </h1></template>