Giter VIP home page Giter VIP logo

Comments (3)

mnlbox avatar mnlbox commented on May 12, 2024 2

@HarveyD Can you explain this?

The downside of removing this plugin is that our bundle won't be able to benefit from Node Resolution Algorithm.

What we are exactly lost in after remove resolve() from plugins for code splitting?

from react-component-library.

HarveyD avatar HarveyD commented on May 12, 2024

Okay so after a bit of experimenting, I've found this happens because of the @rollup/plugin-node-resolve plugin.

When Rollup needs to bundle packages from node_modules, this plugin will mess up the directory structure of our output. In this case, it's bundling tslib (you can see this under node_modules in build).

To solve this, you can:

  • Add tslib to the external field in rollup.config.js,
  • Add it to peerDependencies in package.json (This will prevent tslib from being bundled because of the peerDepsExternal plugin.)
  • Remove @rollup/plugin-node-resolve

I've updated the branch without the @rollup/plugin-node-resolve plugin which has fixed the issue. The downside of removing this plugin is that our bundle won't be able to benefit from Node Resolution Algorithm

from react-component-library.

adnanfajlur avatar adnanfajlur commented on May 12, 2024

it works dude, thanks 😁👌

from react-component-library.

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.