OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add rstackjs/agent-skills --skill rspack-best-practices
Configure, review, or troubleshoot Rspack builds, including loaders, CSS, assets, type checking, bundle optimization, and profiling.
npx skills add rstackjs/agent-skills --skill rspack-best-practices
Apply these rules when writing or reviewing Rspack projects.
rspack.config.ts and defineConfigentry values for multi-page applicationsprocess.env.NODE_ENV only when neededtest, include, exclude, resourceQuery)If @rspack/cli is installed:
rspack dev for local developmentrspack build for production buildrspack preview only for local production previewts-checker-rspack-plugin for integrated dev/build type checkstsc --noEmit/vue-tsc --noEmit as an explicit script stepChoose one strategy:
type: 'css' | 'css/auto' | 'css/module') for modern setupscss-loader + CssExtractRspackPlugin for webpack migration compatibilitystyle-loader for pure style-in-JS runtime injection scenariosOptional:
builtin:lightningcss-loader when goals are syntax downgrade + vendor prefixingsass-loader/less-loader for preprocessing Sass/Less files@tailwindcss/webpack for Tailwind CSS integrationimport() for non-critical code pathstarget aligned with real compatibility requirementspublicpublic files by absolute URL pathasset, asset/resource, asset/inline, asset/source) over legacy file-loader/url-loader/raw-loader--cpu-prof) when JavaScript-side overhead is suspectedRSPACK_PROFILE=OVERVIEW and analyze trace output for compiler-phase bottlenecksbabel-loader, PostCSS, terser) with Rspack built-ins when feasible.map files to public servers/CDNs when production source maps are enabled