Comments (3)
@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.
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 theexternal
field inrollup.config.js
, - Add it to
peerDependencies
inpackage.json
(This will preventtslib
from being bundled because of thepeerDepsExternal
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.
it works dude, thanks 😁👌
from react-component-library.
Related Issues (20)
- react.production.min.js is bundle with the library HOT 5
- [BUG] rollup can't build the library with redux-form HOT 1
- Is it possible to build project with static files? HOT 1
- [on styled-components branch]: mismatching versions of React HOT 3
- Quick comment HOT 1
- Invalid hook call HOT 1
- [Bug] styled-component still generate scss file HOT 1
- Unable to use css/scss module in webpack or rollup. HOT 3
- Material UI as peerDependency not working HOT 2
- Error: Could not resolve './TestComponent/TestComponent' from src\index.ts HOT 1
- Include tsconfig-paths-webpack-plugin for relative paths
- Config for jsx HOT 1
- Getting errors after npm install HOT 2
- [QUESTION] Three shaking in Next.js
- Code Splitting not Working HOT 1
- colors dev-dependency missing HOT 1
- [Feature] Add custom fonts
- taillwind intergration HOT 1
- how come your repo is working if you are not specifying that rollup.config.js is a ES module?
- Error: error:0308010C:digital envelope routines::unsupported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-component-library.