chartist-js / chartist

Simple responsive charts
https://chartist.dev
MIT License
13.34k stars 2.53k forks source link

[Bug]: Can't import `index.css` #1368

Closed nfarina closed 1 year ago

nfarina commented 1 year ago

Would you like to work on a fix?

Current and expected behavior

Hi, I'm probably doing something wrong but before Chartist 1.0, I would "import" chartist.css in my React app and Webpack would bundle it into my app for me.

I tried import css from "chartist.dist.index.css" but at runtime I get:

Error: Package path ./dist/index.css is not exported from package <snip>/node_modules/chartist (see exports field in <snip>/node_modules/chartist/package.json)

As a workaround, I'm copy-pasting the contents of index.css into my app, but it feels like there should be a better way?

Reproduction

Import css using import css from "chartist.dist.index.css"

Chartist version

v1.2.1

Possible solution

No response

RobyCigar commented 1 year ago

same here