alfredosalzillo / rollup-plugin-multi-input

A Rollup plugin to bundle modular libraries
MIT License
133 stars 8 forks source link

Multiple output #40

Closed ops1ops closed 4 years ago

ops1ops commented 4 years ago

Hi, as i understand your plugin allows to use multiple file input using regexp, but the problem is that if i use it, rollup creates 1 bundle which includes all files that matched with this regexp. Is there any way to implement feature, which allows to create bundle file for each file matched with regexp? Or maybe i missed it and its already implemented?

alfredosalzillo commented 4 years ago

Hi, @ops1ops can you give an example?

alfredosalzillo commented 4 years ago

This plugin already create multiple outputs files. If the directory src contains 5 files 1.js, 2.js, 3.js, 4.js, 5.js using the regexp ./src/** you will have in output at least 5 files, if they have code or dependencies in common more then 5.

ops1ops commented 4 years ago

yes but if i use extract option in rollup it creates only 1 css file

alfredosalzillo commented 4 years ago

what plugin are you using for css?

ops1ops commented 4 years ago

rollup postcss

alfredosalzillo commented 4 years ago

can you post the order of the plugins ?

ops1ops commented 4 years ago
babel(babelOptions),
resolve(resolveOptions),
commonjs(commonjsOptions),
postcss(postcssOptions),
terser(),
flow(),
json(),
multiInput()
alfredosalzillo commented 4 years ago

try putting multiInput() before postcss(postcssOptions)