Flarum (v2.0.0)
    Preparing search index...

    Class ExportRegistryInternal

    Implements

    Index

    Constructors

    Properties

    chunkModules: Map<string, Module> = ...
    chunks: Map<string, Chunk> = ...

    The first chunk registered under each id, as before ids were namespaced.

    moduleExports: Map<string, Map<string, any>> = ...
    onLoads: Map<string, Map<string, Function[]>> = ...

    Methods

    • Register a module by the chunk ID it belongs to, the webpack module ID it belongs to, the namespace (extension ID), and its path.

      Parameters

      • chunkId: string | number
      • moduleId: string | number
      • namespace: string
      • urlPath: string

      Returns void

    • Get a registered chunk. Each chunk has at least one module (the default one).

      Chunk ids are only unique within one build, so pass the namespace of the build asking. Bundles built before flarum-webpack-config sent it can't, so without it the chunk is matched by its file name in url where ids collide, and is otherwise the first registered under the id.

      Parameters

      • chunkId: string | number
      • Optionalnamespace: string
      • Optionalurl: string

      Returns Chunk | null

    • Add a function to run when object of id "id" is added (or overridden). If such an object is already registered, the handler will be applied immediately.

      Parameters

      • namespace: string
      • id: string
      • handler: (module: any) => void

      Returns void