stylex
stylex copied to clipboard
Add types to @stylex/nextjs-plugin package
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 https://github.com/facebook/stylex/pull/60, closing https://github.com/facebook/stylex/issues/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.