Giter Site home page Giter Site logo

Comments (8)

marcoturi avatar marcoturi commented on August 15, 2024 13

@d3viant0ne Now that the PR is merged and published, can you show how to use this plugin with html-webpack-plugin? Thank you

from compression-webpack-plugin.

urikphytech avatar urikphytech commented on August 15, 2024 2

Hi, I also can't find any documentation on how to make this work with html-webpack-plugin (i.e. have html-webpack-plugin write the path with the correct file extension).

Can anyone here point me in the right direction? I'd be happy to document it.
Thanks!

from compression-webpack-plugin.

retwedt avatar retwedt commented on August 15, 2024

Apparently this is a duplicate of #45

from compression-webpack-plugin.

farhan687 avatar farhan687 commented on August 15, 2024

No update even after a month?

from compression-webpack-plugin.

lucasvinals avatar lucasvinals commented on August 15, 2024

Hi guys, I've just wrote a simple plugin to connect both plugins.
It just listen for HtmlWebpackPlugin to complete it's build and then change the extensions to files that you specify.

You can download with yarn add change-extension-plugin or npm install change-extension-plugin --save. Cheers! 😃

from compression-webpack-plugin.

retwedt avatar retwedt commented on August 15, 2024

@lucasvinals Awesome I will check it out!

from compression-webpack-plugin.

nrandell avatar nrandell commented on August 15, 2024

I ran into this same problem today and pulled together a simple plugin based on the brotli-webpack-plugin that supports both brotli and gzip compression.
Have a look at brotli-gzip-webpack-plugin that I've shamlessly copied and modified from others. Hopefully it will help until the pull request to fix this gets accepted.

from compression-webpack-plugin.

nerdmax avatar nerdmax commented on August 15, 2024

Just in case some one else find this issue later.

If you are using html-webpack-plugin along side compression-webpack-plugin and you want the html-webpack-plugin to reference the .gz file automatically.

You can try this plugin: html-webpack-change-assets-extension-plugin.

Eg:

plugins: [
  new HtmlWebpackPlugin({
    jsExtension: ".gz"
  }),
  new CompressionPlugin(), // compression plugin will generate the xxx.js.gz file
  new HtmlWebpackChangeAssetsExtensionPlugin()
];

from compression-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.