Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types to @stylex/nextjs-plugin package #325

Closed
lukewhitehouse opened this issue Jan 9, 2024 · 3 comments
Closed

Add types to @stylex/nextjs-plugin package #325

lukewhitehouse opened this issue Jan 9, 2024 · 3 comments

Comments

@lukewhitehouse
Copy link

lukewhitehouse commented Jan 9, 2024

Is your feature request related to a problem? Please describe.
The current implementation of the NextJS plugin doesn't use Flow as other packages like @stylexjs/babel-plugin, so it doesn't include TypeScript or Flow type definitions.

This causes the following error when instantiating the module within a consuming applications next.config.js if you have it included in your tsconfig:

Could not find a declaration file for module '@stylexjs/nextjs-plugin'.

Describe a solution you'd like
This was recently added to the Rollup plugin in #60, closing #46

Describe alternatives you've considered
This will follow the same solution as other packages, so I wouldn't recommend an alternative.

Additional context
N/A.


Open to giving this a shot, I've not used Flow before but I should be able to follow the Rollup PR.

@lukewhitehouse
Copy link
Author

I've made a start with the draft PR, its very much a WIP for now.

@nmn
Copy link
Contributor

nmn commented Jan 9, 2024

The nextjs plugin will be overhauled soon since there are a lot of issues with our Webpack plugin and NextJS plugin. See the issue I created about this for information.

As such, it's not worth spending too much time adding types to the current NextJS plugin.

@lukewhitehouse
Copy link
Author

Okay no worries, thanks for letting me know @nmn. I'll close this for now in that case.

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 a pull request may close this issue.

2 participants