Home Reference Source
import {ProjextRollupStylesheetAssetsPlugin} from 'projext-plugin-rollup/src/plugins/stylesheetAssets/index.js'
public class | source

ProjextRollupStylesheetAssetsPlugin

This is a Rollup plugin that reads stylesheets and CSS blocks on JS files in order to find paths for files relative to the styles original definition file, then it copies them to the a given directory and fixes the URL on the stylesheet/CSS block.

Static Member Summary

Static Public Members
public static get

Returns the helper plugin, which allows to wrap CSS styles being exported by ES modules on an specific function so this plugin can find them and fix their paths.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

The name of the plugin's instance.

Method Summary

Public Methods
public

Gets the plugin options

public

This is called after Rollup finishes writing the files on the file system.

Static Public Members

public static get helper: Function source

Returns the helper plugin, which allows to wrap CSS styles being exported by ES modules on an specific function so this plugin can find them and fix their paths.

Public Constructors

public constructor(options: ProjextRollupStylesheetAssetsPluginOptions, name: string) source

Params:

NameTypeAttributeDescription
options ProjextRollupStylesheetAssetsPluginOptions
  • optional
  • default: {}

The options to customize the plugin behaviour.

name string
  • optional
  • default: 'projext-rollup-plugin-stylesheet-assets'

The name of the plugin's instance.

Public Members

public name: string source

The name of the plugin's instance.

Public Methods

public getOptions(): ProjextRollupStatsPluginOptions source

Gets the plugin options

public writeBundle() source

This is called after Rollup finishes writing the files on the file system. This is where the plugin opens the file and process the stylesheet/CSS blocks.