import {ProjextRollupRuntimeReplacePlugin} from 'projext-plugin-rollup/src/plugins/runtimeReplace/index.js'
ProjextRollupRuntimeReplacePlugin
This is a Rollup plugin that works as a wrapper for @rollup/plugin-replace
in order to reload
all definitions when the bundle changes.
Constructor Summary
Public Constructor | ||
public |
constructor(definitionsFn: Function():Object, name: string) |
Method Summary
Public Methods | ||
public |
This is called when Rollup starts the building process; if it's not the first build, it will
reload the definitions. The reason it doesn't load them on the first build it's because
when the plugin is instantiated, the definitions are already loaded for the
|
|
public |
This is called by Rollup when is parsing a file, and it just "forwards the call" to
|
Public Constructors
public constructor(definitionsFn: Function():Object, name: string) source
Params:
Name | Type | Attribute | Description |
definitionsFn | Function():Object | When this function is called, it should return the object with the definitions. |
|
name | string |
|
The name of the plugin's instance. |
Throw:
If |
Public Methods
public buildStart() source
This is called when Rollup starts the building process; if it's not the first build, it will
reload the definitions. The reason it doesn't load them on the first build it's because
when the plugin is instantiated, the definitions are already loaded for the
@rollup/plugin-replace
instance creation.