Comments (7)
The suggested Vite config addition from the other ticket actually worked wonders. Thx.
ssr: {
noExternal: [/^d3.*$/, /^@nivo.*$/],
},
from nivo.
Perhaps a useful article on how to make the library work well for both ESM
and CommonJS
: https://www.maxpou.fr/blog/publish-npm-package-esm-and-cjs/
from nivo.
You might also want to switch from lodash
to lodash-es
so you can use imports like import { cloneDeep } from 'lodash-es'
while benefiting from ESM's tree shaking to minimize the end users bundle size.
from nivo.
I think it's a duplicate of #2310.
from nivo.
Could be but everyone wants to discontinue the commonjs version while the exports
skips the need to do so, keeping only the lodash
afterwards. I've managed to get it to work locally by patching nivo by both adding the exports
section to all nivo package.json
files and by adding the .js
extension suffix to all lodash
imports. I'll try to create a pull request for both.
from nivo.
everyone wants to discontinue the commonjs version while the exports skips the need to do so
There are many tools out there, some with their own way of loading things, I think that's a bold assumption.
from nivo.
I'm going to close this issue, as it's clearly related.
from nivo.
Related Issues (20)
- The prop `defs` is marked as required in `Ge2`, but its value is `undefined HOT 4
- Warning: A props object containing a "key prop is being spread into JSX:
- Error t.useMemo using React 16.14.0 HOT 3
- The size of the SVG does not adapt to the size of the graph HOT 2
- Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' HOT 1
- π©Custom Legend causes infinite re-render! π© HOT 1
- Nivo Bar Chart: Incorrect Decimal Rounding in Labels
- Line Chart : crash when hovering an empty chart that is interactive
- onMouseEnter and onMouseLeave don't work on @nivo/geo HOT 1
- The arc link labels for ResponsivePie overflow the drawable area. HOT 2
- @nivo/calendar type CalendarDatum is missing 'data' property
- There is no way to add border around the bar chart
- Choropleth: Support fill color by value or label
- Add support for forwardRef to allow exporting of images, (Sankey chart)
- [ Heatmap ] Warning in console while using Legend for heatmap HOT 1
- @nivo/line warnings when using Nivo >= 0.87.0 line chart HOT 1
- Nivo/line, stack line does not match the values in the graph. HOT 3
- Wrong `PointMouseHandler` type on event handlers like `onMouseMove` HOT 1
- Nivo Sankey Chart adjustable node thickness HOT 2
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 nivo.