Skip to content

Conversation

@calinoracation
Copy link
Contributor

This is a slight modification to support typescript type exporting as well as publishing ES & CJS versions along with the published build. It doesn't do auto publishing or tagging mentioned in #57, but might help with figuring a few things out in that process.

}

if ([...document.styleSheets].filter((s) => s.href !== null).length) {
if ([ ...document.styleSheets ].filter((s) => s.href !== null).length) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I may of had the pretty: true flag turned on momentarily that led to this autoformatting, happy to remove it.

@@ -0,0 +1,29 @@
{
"compilerOptions": {
"target": "ES2020",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of these might not be necessary, I was working through which ones were needed or not but starting from a point where at least it was all working for us.

},
}
},
plugins: [dts()],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This creates the index.d.ts file for the exported type information. Without this many folks importing through a bundler with typescript would require not-insignificant amounts of changes and no typing information. It's possible to do it without another package, but it helped simplify the output quite a bit.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant