Skip to content

[BUG]: extends key path #24

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions