import {ProjextRollupStylesheetAssetsHelperPlugin} from 'projext-plugin-rollup/src/plugins/stylesheetAssets/helper.js'
ProjextRollupStylesheetAssetsHelperPlugin
This is Rollup helper plugin for ProjextRollupStylesheetAssetsPlugin that wraps CSS code being exported by ES modules so it can be found and fixed.
Constructor Summary
Public Constructor | ||
public |
constructor(options: ProjextRollupStylesheetAssetsHelperPluginOptions, name: string) |
Member Summary
Public Members | ||
public |
The filter to decide which files will be processed and which won't. |
|
public |
The name of the plugin's instance. |
Method Summary
Public Methods | ||
public |
Gets the plugin options |
|
public |
This gets called when Rollup starts the bundling process. |
|
public |
transform(code: string, filepath: string): RollupFileDefinition This is called by Rollup when is parsing a file. |
Public Constructors
public constructor(options: ProjextRollupStylesheetAssetsHelperPluginOptions, name: string) source
Params:
Name | Type | Attribute | Description |
options | ProjextRollupStylesheetAssetsHelperPluginOptions |
|
The options to customize the plugin behaviour. |
name | string |
|
The name of the plugin's instance. |
Public Members
public filter: RollupFilter source
The filter to decide which files will be processed and which won't.
Public Methods
public getOptions(): ProjextRollupStylesheetAssetsHelperPluginOptions source
Gets the plugin options
public intro(): string source
This gets called when Rollup starts the bundling process. It returns the code for the function that will wrap the CSS styles.
public transform(code: string, filepath: string): RollupFileDefinition source
This is called by Rollup when is parsing a file.
Return:
RollupFileDefinition (nullable: true) | If the file matches the plugin filter, it will parse it and
return a new definition, otherwise it will just return |