Skip to content

Conversation

@hbnordin2
Copy link

The css imports aren't working properly :)

@TomPlum TomPlum self-requested a review January 15, 2026 19:39
@TomPlum TomPlum added the bug Something isn't working label Jan 15, 2026
@TomPlum
Copy link
Owner

TomPlum commented Jan 15, 2026

The css imports aren't working properly :)

Hey @hbnordin2 , I just created a new react-ts-swc project and installed it, rendered a GraphCanvas2D with some dummy data and it seems to be rendering okay. I can see the index.css in the root of the tarball and I can see it being served in my browsers dev tools, but maybe I'm doing something different from you.

Are you able to share more of your build tooling please?

"types": "./dist/index.d.ts",
"import": "./dist/react-git-log.js"
},
"./dist/index.css": "./dist/index.css"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need /dist in the entry point here, a bit cleaner straight from the root IMO

Suggested change
"./dist/index.css": "./dist/index.css"
"./styles.css": "./dist/index.css"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably also worth including this in the package.json to prevent CSS from being tree-shaken. Although I'm happy to make the changes.

"sideEffects": [
  "./dist/*.css"
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants