Skip to content

How to listen to other configuration files #3021

Answered by liyincode
kurorinto asked this question in Q&A
Discussion options

You must be logged in to vote

dev.watchFiles

in rsbuild.config.ts

export default defineConfig({
  dev: {
    watchFiles: {
      type: 'reload-server',
      paths: ['./configs/configA.ts', './configs/configB.ts'] 
    }
  }
});

You can use this configuration to listen to the configA.ts and configB.ts files separately
Or use paths: ['. /configs/*.ts'] listen on all ts files in the configs directory

Any change in the contents of the file triggers a devServer restart

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kurorinto
Comment options

Answer selected by chenjiahan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants