-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Hi, not sure if it's exactly rsbuild issue, but for me when I save one file it recompiles all of them, considering 55 packages it's quite some time. I tried the Vite plugin for the storybook, and it only updates the affected file.
// main.ts
import { dirname, join } from "path";
const path = require("path");
module.exports = {
transform: {
"^.+\\.(t|j)sx?$": "@swc/jest",
},
stories: ["../packages/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-actions",
"@storybook/addon-a11y",
"@storybook/addon-controls",
"@storybook/addon-toolbars",
],
framework:"storybook-react-rsbuild",
rsbuildFinal: (config) => {
config.output ??= {};
config.output.assetPrefix = "/myproject/";
return config;
},
typescript: {
reactDocgen: false,
},
};
// rsbuild.config.ts
import { defineConfig } from "@rsbuild/core";
import { pluginReact } from "@rsbuild/plugin-react";
import { pluginSvgr } from "@rsbuild/plugin-svgr";
export default defineConfig({
plugins: [
pluginReact(),
pluginSvgr({
svgrOptions: {
exportType: "default",
svgoConfig: {
plugins: [
{
name: "preset-default",
params: {
overrides: {
removeViewBox: false,
inlineStyles: {
onlyMatchedOnce: false,
},
cleanupIds: false,
},
},
},
],
},
},
}),
],
});
Thank you!
Metadata
Metadata
Assignees
Labels
No labels