Skip to content

IanSun/rollup-plugin-string

Repository files navigation

npm size

@ian-sun/rollup-plugin-string

A Rollup plugin which imports files as string.

Install

Using npm:

npm install --save-dev @ian-sun/rollup-plugin-string

Usage

Create a rollup.config.js configuration file and import the plugin:

// rollup.config.js
import string from '@ian-sun/rollup-plugin-string';

export default {
  input: 'input.js',
  output: {
    dir: 'output',
  },
  plugins: [string()],
};

Then call rollup either via the CLI or the API.

Options

exclude

Type: string | Array<string>
Default: null

A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore. By default no files are ignored.

include

Type: string | Array<string>
Default: null

A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.

License

LICENSE (MIT)