Skip to content

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

@nfarina

Description

@nfarina

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions