Skip to content

Allow Multiple path for an alias in package.json  #140

Description

@codad5

Just like typescript path alias, where multiple paths can be tied to an alias make it possible to do so in the package.json

/* other tsconfig,json setting */
"moduleResolution": "node",                       /* Specify how TypeScript looks up a file from a given module specifier. */
    "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
    "paths": {
      "@/*": [
        "./src/*", 
        "./dist/*"
      ],
    }, /* Specify a set of entries that re-map imports to additional lookup locations. */

make it same for package.json where the build and src path could differ
Something like this

"main": "dist/server.js",
  "_moduleAliases": {
    "@": ["src", "dist"]
  },

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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