clean-package
clean-package copied to clipboard
[BUG]: extends key path
hello there.... clean-package is awesome ❤️❤️❤️ but its extends functionality is broken i'm using config in package.json and i used path as relative to package.json
"clean-package": {
"extends": "../../../clean-package.config.json",
}
but it gives error MODULE_NOT_FOUND
and i saw your source code and you are using normal node require
function to load extended config. And i used path relative to node_modules/clean-pacakge/dist/main.js
and it works
"clean-package": {
// "extends": "../../../clean-package.config.json", // relative to package.json
"extends": "../../../../../../clean-package.config.json" // relative to node_modules/clean-pacakge/dist/main.js
}
also... i'm using monorepo and i created a package and hoist it with pnpm and use this config but it also doesn't work
"clean-package": {
"extends": "@frontplus-ui/clean-package-config"
}
SOLUTION
if extends
path is relative path use requireFile
util from utils/requireFile
as you are using it when config is string in package.json hint