Giter Site home page Giter Site logo

Comments (8)

jamesfiltness avatar jamesfiltness commented on July 16, 2024

I'm experiencing the same issue. All bundles get compressed correctly other than someothercomponent.bundle.js which is imported dynamically using import().

compression

from compression-webpack-plugin.

michael-ciniawsky avatar michael-ciniawsky commented on July 16, 2024

@jamesfiltness Are you also using computed values in the import() path to generate multiple chunks ?

Could someone make a small repo for reproduction please ?

from compression-webpack-plugin.

jamesfiltness avatar jamesfiltness commented on July 16, 2024

@michael-ciniawsky Sure, I have a repo that demonstrates the issue. The dynamic import() that doesn't get compressed is imported here: https://github.com/jamesfiltness/webpack-2-code-splitting/blob/master/src/universal/app.js#L14

I'm not using computed values.

from compression-webpack-plugin.

alexander-akait avatar alexander-akait commented on July 16, 2024

@jamesfiltness @shye0000 don't reproducible, seems you have default minRatio, just try increase value (use minRatio: Number.MAX_SAFE_INTEGER for compress all assets)

from compression-webpack-plugin.

michael-ciniawsky avatar michael-ciniawsky commented on July 16, 2024

Feel free to reopen if still regressions

from compression-webpack-plugin.

dev-flc avatar dev-flc commented on July 16, 2024

compress all files

example2

 new CompressionPlugin({
    asset : '[path].gz[query]',
    algorithm : 'gzip',
    test : /\.js$|\.css$|\.eot?.+$|\.ttf?.+$|\.woff?.+$|\.svg?.+$/,
    minRatio: Number.MAX_SAFE_INTEGER, // Compress everything
    //minRatio  : 0.5,
    cache : true,
    threshold: 10240,
    deleteOriginalAssets : false
})```

from compression-webpack-plugin.

jojo-tutor avatar jojo-tutor commented on July 16, 2024

@shye0000 , @jamesfiltness , try removing the "threshold" property, which will default to zero. Read this documentation: https://github.com/webpack-contrib/compression-webpack-plugin#threshold

from compression-webpack-plugin.

guanzo avatar guanzo commented on July 16, 2024

None of these options are working for me. Dynamic imports aren't being compressed.

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.