Problem with ESM import syntax with pluginutils
brettz9 opened this issue · comments
Hi,
Thanks for the very handy plugin.
As per rollup/plugins#171 , it seems that as long as pluginutils is exporting a default (only), your ESM syntax at
rollup-plugin-babel/src/index.js
Line 2 in ae788a3
import pluginutils from 'rollup-pluginutils';
const {createFilter} = pluginutils;
And actually, with the old version of pluginutils deprecated, it really should be pointing to @rollup/pluginutils
instead:
import pluginutils from '@rollup/pluginutils';
const {createFilter} = pluginutils;
Btw, while it may work with some compilers or configurations, the above is required for those which adhere strictly to ESM.
There is an ongoing effort to migrate this plugin to the plugins monorepo - rollup/plugins#108 . I'm afraid we won't be fixing this for v4, but I will make sure that it's fixed for the upcoming v5 (which is going to be released when this mentioned PR lands). Hope you understand.
Fixed there in rollup/plugins@050ceca