GithubHelp home page GithubHelp logo

Comments (7)

keepitterron avatar keepitterron commented on July 28, 2024 2

Absolutely!

{
  "entry":{
    ...multiple entries
  },
  "output":{
     "path":"/Users/claudio/Projects/loom/dist/webpack",
     "publicPath":"https://cdn.loom.com/assets/",
     "filename":"js/[name]-[contenthash].js"
  },
  "devtool":false,
  "module":{
     "rules":[...rules]
  },
  "optimization":{
     "moduleIds":"hashed",
     "splitChunks":{
        "cacheGroups":{
           "default":false,
           "commons":{
              "name":"commons",
              "test":{
                 
              },
              "chunks":"all",
              "minChunks":3
           }
        }
     },
  },
  "plugins":[...plugins],
  "resolve":{...aliases only},
  "mode":"production"
}

babel.config contains preset/react and preset/env with no modules nor target options set.

from optimize-plugin.

developit avatar developit commented on July 28, 2024 1

Awesome, thanks for this. I will try to set up a test case. I likely missed some bundle parsing cases for multi-entry since I avoid using multi-entry whenever possible for performance reasons.

from optimize-plugin.

3zzy avatar 3zzy commented on July 28, 2024 1

We bundle multiple separate 'apps' so we definitely need multiple entries, not something we can avoid unfortunately.

from optimize-plugin.

developit avatar developit commented on July 28, 2024

Hiya - this seems the same as the second issue mentioned in #7.
Are you able to share your Webpack configuration - in particular the mode, target and output options?

from optimize-plugin.

keepitterron avatar keepitterron commented on July 28, 2024

Oh that's very interesting. I can intuitively understand why would it be a performance drain, do you have any links where I can learn more (multi entry webpack)? 🙏
I'll do some digging of my own in the meanwhile :)

from optimize-plugin.

developit avatar developit commented on July 28, 2024

@keepitterron it's a little buried in the docs, but there now:
https://webpack.js.org/plugins/module-concatenation-plugin/#optimization-bailouts

from optimize-plugin.

developit avatar developit commented on July 28, 2024

For those hitting this issue, you can disable automatic modernization via new OptimizePlugin({ modernize: false }). This improves performance, but will use the unmodified ES5 source of most npm modules since they do not publish modern code.

from optimize-plugin.

Related Issues (13)

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.