This plugin will look for declareSubApp calls and do these:

  1. instruct webpack to name the dynamic import bundle as subapp-<name>
  2. collect the subapp meta info and save them as subapps.json

Constructors

  • Parameters

    • Optional options: {
          assetsFile?: string;
          declareApiName?: string | string[];
          webpackVersion?: number;
      }

      subapp plugin options

      • Optional assetsFile?: string

        Filename to output the subapp assets JSON file default: subapps.json

      • Optional declareApiName?: string | string[]

        The API names for declaring subapp and components

      • Optional webpackVersion?: number

        Webpack version

        minimum 5

    Returns SubAppWebpackPlugin

Properties

_assetsFile: string
_declareApiNames: string[]
_foundSubApps: string
_hasHmr: ((compilation) => boolean)

Type declaration

    • (compilation): boolean
    • Parameters

      • compilation: any

      Returns boolean

_makeIdentifierBEE: Function
_subApps: Record<string, any>
_tapAssets: Function
_webpackMajorVersion: number
findImportCall: any

Methods

  • Webpack 5 Reference:

    • lib/HotModuleReplacementPlugin.js

    Parameters

    • compiler: any

    Returns void

  • Parameters

    • compiler: any

    Returns void

  • Returns {
        BasicEvaluatedExpression: any;
        hasHmr: (() => boolean);
        makeIdentifierBEE: ((expr) => any);
        tapAssets: ((compiler) => void);
    }

    • BasicEvaluatedExpression: any
    • hasHmr: (() => boolean)
        • (): boolean
        • Returns boolean

    • makeIdentifierBEE: ((expr) => any)
        • (expr): any
        • Parameters

          • expr: any

          Returns any

    • tapAssets: ((compiler) => void)
        • (compiler): void
        • Parameters

          • compiler: any

          Returns void

  • Parameters

    • assets: any

    Returns void