Imply ES6 module package, when package.json contanis 'module':...
In my package.json I have 'type':'module' and in my code I write import babel from '@rollup/plugin-babel. The package.json of the latter contains "main": "dist/index.js", "module": "dist/index.es.js" but there is no 'type':'module'. In turn nodejs concludes that @rollup/plugin-babel is commonjs and there is no way to use the default import from dist/index.es.js. This means I have to write babel.default in my code and I cannot use import {babel} from '@rollup/plugin-html.
• When NodeJS imports a package(.json) that contains 'main' and 'module' fields, but no 'type' field, from a package containing 'type':'module', implicitly conclude that the imported package is an ES6 module.