Skip to content

Ship type declarations for the loader #1617

Open
@stof

Description

Feature Proposal

Having type declaration for the loader and its supported options would allow projects using typescripts (either because they use webpack.config.ts or because they use it to check JS code with --checkJs) to validate their options against the supported options (and potentially to get IDE completion as well, depending on how they write their code).

https://github.com/webpack/tooling/ has reusable tools to generate type declarations for supported options based on the JSON schema, used by webpack itself for its supported options. It could probably be reused by this loader.

Feature Use Case

Please paste the results of npx webpack-cli info here, and mention other relevant information

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions