Run within a module repository
Garbee opened this issue · comments
I seem to only be able to run the generator when the type is set to commonjs
. Setting the package type to module
always causes a configuration error, even if the config is named .cjs
to force the commonjs loader.
Example: https://github.com/Garbee/material-icons
Steps to reproduce:
git clone --recursive git clone --recursive https://github.com/Garbee/material-icons.git icons-test
cd icons-test
npm ci
npm run icons
Does anyone know of a way to make this work while in a module package? Or will we need to change back to commonjs when running this for the time being?
I did some digging earlier and it looks like cosmiconfig is looking for maintainers and no longer actively maintained. There are some issues around module loading upstream. So this could be a non-issue here technically. However, an alternative config loader should be looked into if that is the case and cosmiconfig isn't actively maintained.
cosmiconfig landed support for cjs in 8.2.0 so all that's needed is a cosmiconfig dep version bump! cosmiconfig/cosmiconfig#224 (comment)