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

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

Open
codad5 opened this issue Nov 10, 2023 · 0 comments
Open

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

codad5 opened this issue Nov 10, 2023 · 0 comments

Comments

@codad5
Copy link

codad5 commented Nov 10, 2023

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"]
  },
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

1 participant