Skip to content

web-types.json does not load for IntelliJ IDEA 2024.1 #82

Description

@nemsjulie

I'm currently working on a Vue 3 project that imports a package of Vue 3 components from node_modules. This package is released using npm and serves as a plugin library, enabling me to install the components as global components within my Vue 3 project as shown below.

Vue 3 project:

import {plugin} from 'privatecomponentsplugin''


const app = createApp(App)

app
.use(router)
.use(vuetify)
.use(store)
.use(plugin)

Components plugin:

export const plugin = {
    install: (app: App) => {
        Object.keys(Components).forEach(name => {
            app.component(name, Components[name])
        })
    }
}

The components plugin npm library package.json includes this:

"web-types": "./web-types.json"

and the web-types.json file exists in the same root as package.json which has been created by using vue-docgen-web-types version 0.1.8.

By doing so, the components that were imported into the Vue project were recognized in IntelliJ IDEA 2020(2020.2.4 and 2020.3.4), 2021(2021.1.3) and 2022(2022.1.4). However, it is not recognized in 2024.1. I've also tested in version 2023.1.6 and 2023.3.6 which do not work either but gives me this file problem Unknown html tag n-button-add.

I've also checked if the npm package has been excluded from the indexing, but the package is gray which indicates that it is not excluded.

Is this a bug on the newer versions of IntelliJ or do we need to do some more work for it to be recognizable? I find it kinda weird how vuetify components are still recognized though, so it could be that I've missed something that are needed for it to work in the newer IntelliJ versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions