gzip-loader

gzip-loader

gzip loader module for webpack

Enables loading gzipped resources.

Install

npm install --save-dev gzip-loader

Usage

webpack.config.js

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

bundle.js

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

© JS Foundation and other contributors
Licensed under the Creative Commons Attribution License 4.0.
https://webpack.js.org/loaders/gzip-loader

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部