rspack
                                
                                 rspack copied to clipboard
                                
                                    rspack copied to clipboard
                            
                            
                            
                        [Feature]: preload & prefetch plugin
What problem does this feature solve?
I want to support resource hints in my project, such as preload/prefetch, to improve the performance of the production environment
What does the proposed API of configuration look like?
I tried to use @vue/preload-webpack-plugin, but it is not compatible. We can write a plugin, for example:
export default defineConfig({
  plugins: [
    new rspack.PreloadRspackPlugin({
      rel: 'preload',
      include: 'initial',
      fileBlacklist: [
        /\.map$/,
       /hot-update\.js$/,
      ],
    }),
    new rspack.PreloadRspackPlugin({
      rel: 'prefetch',
     include: 'asyncChunks'
    }),
]
});
Or migrate rsbuild's performance.preload and performance.prefetch :
export default defineConfig({
  performance: {
    dnsPrefetch: ['https://example.com'],
    preconnect: ['https://example.com/'],
    preload: {
      type: 'initial',
    },
    prefetch: {
      type: 'all-chunks',
    },
  },
});