{"version":3,"file":"rsbuild.cjs","sources":["../../src/plugin/rsbuild.ts"],"sourcesContent":["import type { RsbuildPlugin } from \"@rsbuild/core\";\nimport { build } from \"../cli/commands/build\";\nimport { dev } from \"../cli/commands/dev\";\nimport { pluginName } from \"./index\";\n\nexport default (): RsbuildPlugin => ({\n  name: pluginName,\n  setup(api) {\n    api.onBeforeBuild(async () => {\n      await build();\n    });\n    api.onBeforeStartDevServer(async () => {\n      await dev();\n    });\n  },\n});\n"],"names":["pluginName","build","dev"],"mappings":";;;;;;AAIA,cAAe,OAAO;AACtB,EAAE,IAAI,EAAEA,gBAAU;AAClB,EAAE,KAAK,CAAC,GAAG,EAAE;AACb,IAAI,GAAG,CAAC,aAAa,CAAC,YAAY;AAClC,MAAM,MAAMC,WAAK,EAAE;AACnB,IAAI,CAAC,CAAC;AACN,IAAI,GAAG,CAAC,sBAAsB,CAAC,YAAY;AAC3C,MAAM,MAAMC,OAAG,EAAE;AACjB,IAAI,CAAC,CAAC;AACN,EAAE;AACF,CAAC,CAAC;;;;"}