Skip to content

Can rspack build support the output of gzip files? #2172

Answered by xc2
sweetwisdom asked this question in Q&A
Discussion options

You must be logged in to vote

可以使用这个 webpack 插件:https://github.com/webpack-contrib/compression-webpack-plugin

// rsbuild.config.ts
import CompressionPlugin from "compression-webpack-plugin";


export default defineConfig({
  // ...
  tools: {
    rspack: {
      plugins: [new CompressionPlugin({})]
    }
  }
});

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@xc2
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
4 participants