JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 36802
  • Score
    100M100P100Q157940F
  • License MIT

rollup plugin for multiple input using glob

Package Exports

  • rollup-plugin-multi-input

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rollup-plugin-multi-input) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rollup-plugin-multi-input

Use multiple entry points in your rollup bundle. Let you use glob in input. Preserve the dir structure in the output dir.

Install

Install via npm or yarn.

npm i -D rollup-plugin-multi-input
yarn add rollup-plugin-multi-input

Setup

In your rollup config

import multiInput from 'rollup-plugin-multi-input';

export default {
    input: ['src/**/*.js'],
    output: {
      format: 'esm',
      dir: 'dist'
    },
    plugins: [ multiInput() ],
};

If using a rollup lower version than 1.0.0, experimentalCodeSplitting must be enabled.

Options

relative 'src/'

Specific the relative path to use in the dist folder.

Example:

import multiInput from 'rollup-plugin-multi-input';

export default {
    input: ['src/bar.js', 'src/foo/bar.js'],
    output: {
      format: 'esm',
      dir: 'dist'
    },
    plugins: [ multiInput({ relative: 'src/' }) ],
};
// create the files dist/bar.js and dist/foo/bar.js

glob {}

fast-glob object configuration.