rollup-plugin-file-import

1.1.0 • Public • Published

rollup-plugin-file-import

This plugin allows you to emit files to rollup bundle.

Install

yarn add rollup-plugin-file-import --dev

or

npm install rollup-plugin-file-import -D

Usage

// rollup.config.js

import fileImport from 'rollup-plugin-file-import'

export default {
  // ...
  plugins: [
    fileImport([
      {
        // absolute path to output directory
        outputDir: `/user/project/public/images`,
        extensions: ['.png', '.jpg', '.jpeg'],
      },
    ])
  ]
}

Options

{
  outputDir: string,
  extensions: string[],
}[]

outputDir

Absolute path to output directory

Required

extensions

File extension (.png, .jpg)

Required

Package Sidebar

Install

npm i rollup-plugin-file-import

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

12.2 kB

Total Files

5

Last publish

Collaborators

  • r0kan