A rollup.js plugin to import from Vinyl files.
npm i -D rollup-plugin-vinyl
import vinyl from 'rollup-plugin-vinyl';
import File from 'vinyl';
export default {
entry: 'src/main.js',
format: 'cjs',
plugins: [
// Single file
vinyl({ files: new File({ ... }) }),
// Multiple files
vinyl({ files: [
vinylFile1,
vinylFile2,
...
] }),
// Custom module resolution
// This will resolve `import Module from 'lib/module'`
// to `lib/module.ts` or `lib/module/index.ts`
vinyl({
extension: 'ts',
files: ...
})
],
dest: 'bundle.js'
}
git clone https://github.com/operandom/rollup-plugin-vinyl.git
cd rollup-plugin-vinyl
npm install
npm test
Released under the MIT license.