Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: extends key path #24

Open
ghost opened this issue Oct 16, 2023 · 0 comments
Open

[BUG]: extends key path #24

ghost opened this issue Oct 16, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 16, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants