Do you want to request a feature or report a bug?
Feature request
Currently, Metro supports require.context, added in this PR, but it lacks built-in type definitions. This makes it more challenging to use require.context effectively as there's no code completion, error checking, or refactoring support for its arguments.
Property 'context' does not exist on type 'NodeRequire'.
Right now, I have to create a types file and add the following content from @EvanBacon's Metro-Context-Modules-Demo repo, having them included by default in Metro would be a great improvement.
Including type definitions for require.context would significantly improve the developer experience by enabling these features and making code using require.context more robust and maintainable.
Do you want to request a feature or report a bug?
Feature request
Currently, Metro supports
require.context, added in this PR, but it lacks built-in type definitions. This makes it more challenging to userequire.contexteffectively as there's no code completion, error checking, or refactoring support for its arguments.Right now, I have to create a types file and add the following content from @EvanBacon's Metro-Context-Modules-Demo repo, having them included by default in Metro would be a great improvement.
Including type definitions for
require.contextwould significantly improve the developer experience by enabling these features and making code usingrequire.contextmore robust and maintainable.