You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.dependency.

Annotation Type NpmPackage

  • @Retention(RUNTIME)
    @Target(TYPE)
    @Documented
    @Inherited
    @Repeatable(Container.class)
    public @interface NpmPackage

    Annotation for defining an npm package dependency on a Component class which includes one or more JS modules. The JS Modules can be defined using JsModule annotation on the same Component. For adding multiple npm packages files for a single component, you can use this annotation multiple times.

    Declared npm packages will be bundled by flow-maven-plugin in a package.json file, making sure that only one dependency is created.

    Since:

    2.0

    Author:

    Vaadin Ltd

    • Required Element Summary

      Required Elements
      Modifier and Type Required Element Description
      String value

      npm package to install before loading any JS modules declared using JsModule.

      String version

      Defines the npm package version.

    • Element Detail

      • value

        String value

        npm package to install before loading any JS modules declared using JsModule.

        Returns:

        an npm JavaScript package

      • version

        String version

        Defines the npm package version. It should meet the 'd.d.d' or the 'd.d.d-suffix' pattern.

        Troubleshooting: when two or more annotations with the same package value are found in the class-path, and their versions do not match the build process will fail.

        Returns:

        npm package version