Builds a simple ES module that imports a list of other modules you provide, and then re-exports those modules in order as an array. Useful for building extensible navigation lists, routes, strategies, etc.
This class uses export-esm-collection-loader to build the source code.
-
TargetableESModuleArray
- .addImport(importString) ⇒
undefined - .add(...items) ⇒
undefined - .push(...importString) ⇒
undefined - .unshift(...importString) ⇒
undefined
- .addImport(importString) ⇒
Adds a module to the end of the array.
This also acts as an alias for the push() function.
Returns: Parameters
stringAdd a module or modules to the end of the array.
This also acts as an alias for the push() function.
Returns: Parameters
anyAdd a module or modules to the end of the array.
Returns: Parameters
stringAdd a module or modules to the beginning of the array.
Returns: Parameters
stringSource Code: pwa-studio/packages/pwa-buildpack/lib/WebpackTools/targetables/TargetableESModuleArray.js