-
Thanks this awesome project! I am building a ts library with $ rsbuild build --watch My configuration: // rsbuild.config.ts
export default defineConfig({
plugins: [pluginServe()]
})
function pluginServe(type: string): RsbuildPlugin {
return {
name: 'serve',
setup(api) {
// It's never work:
api.onAfterBuild(() => {
console.log('after', {type})
})
api.onBeforeBuild(() => {
// It's worked
console.log('before', {type})
})
}
}
} the If anyone knows how to make it effective and share some content with me. I will be very thankful to you :). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
export default defineConfig({
tools: {
rspack: {
plugins: [
{
apply(compiler) {
compiler.hooks.done.tapPromise("foo", async (stats) => {
// do something
});
},
},
],
},
}
}); |
Beta Was this translation helpful? Give feedback.
-
@chenjiahan What do you think about calling |
Beta Was this translation helpful? Give feedback.
opened a pr #1771