Open pascalduez opened 4 years ago
Ah, interesting. We use the transform
hook to work to snag some information related to rollup-plugin-multi-entry
, but that clearly won't work when used as an output plugin. The good news is that this step is only relevant if you are using rollup-plugin-multi-entry
, so, you can safely ignore the warning for now.
I'm not sure how to fix this. One option is to just remove the extra rollup-plugin-multi-entry
logic, or at least make it something people need to enable explicitly. I don't know how many people are even using that feature at this point.
you can safely ignore the warning for now
Yep, thanks!
at least make it something people need to enable explicitly
Sounds like a good option.
BTW the rollup-plugin-multi-entry
plugin has been renamed into @rollup/plugin-multi-entry
.
After thinking about this some more, I think it makes sense to remove the @rollup/plugin-multi-entry
logic from this plugin (didn't realize it was renamed), and instead add glob support to our config input. That way, if you are using @rollup/plugin-multi-entry
, you can just pass the same pattern to both plugins:
import multiEntry from '@rollup/plugin-multi-entry'
import flowEntry from 'rollup-plugin-flow-entry'
const input = 'src/*.js'
export default {
input,
output: { ... },
plugins: [
multiEntry(),
flowEntry(input)
]
}
When used as "output plugin" the following warning arise:
We ideally want the plugin to be run only for commonjs, if not it will generate a
.flow.js
file for every output.Despite the warning, the desired output file is properly created.
Sample config using multiple output: