🌐 AI搜索 & 代理 主页
Skip to content

Autogenerated web-types.json #2299

@linusback

Description

@linusback

Clear and concise description of the problem

When using any jetbrains product (eg. webstorm, intellij etc) it is very hard to get code completion for the components to work properly, this has been mentioned before in 786.

For me some components are missing props and it tries to import components directly from *.mjs files whose component names are wrong. The old bootrstrap-vue project had this implemented, and copying that web-types.json to my node_modules folder solved my issues (even thought it is not 100% feature compatible so i got some icons and stuff with it).

Example:
I have made minimalist example of the problem can be found [here](https://github.com/linusback/bootstrap-vue-next-component-example) and below are some examples of the current behavior.

Suggested solution

Auto generate web-types.json and ship with dist as part of the build process somehow.

I would be willing to try to work on this, but would really appreciate advice/any pointers as to where to start.
Currently I'm experimenting with trying to generate these using load or transform hocks in packages/bootstrap-vue-next/vite.config.mts. But i'm starting to think that it should be separate from the build process of the main package, maybe take an approach more similar to bootstrap-vue and create a saparate script for this.

Alternative

Create a separate package @web-types/bootstrap-vue-next that contains the web-types similair to the one for bootstrap-vue.

Additional context

I'm somewhat lacking in space of frontend development (I usually have more of a backend/data engineering role) so please point out any wrong assumptions and be patient with any lack of knowledge on my part.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions