赞助 webpack,同时从官方商店购买衣服 所有收益将转到我们的 open collective

gzip-loader

gzip loader module for webpack

Enables loading gzipped resources.

安装

npm install --save-dev gzip-loader

用法

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.gz$/,
        enforce: 'pre',
        use: 'gzip-loader'
      }
    ]
  }
}

bundle.js

require("gzip-loader!./file.js.gz");

维护人员


      John-David Dalton


      Juho Vepsäläinen


      Joshua Wiens


      Michael Ciniawsky


      Alexander Krasnoyarov