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

Add support for Node.js Subpath Imports #263

Open
in-in opened this issue Mar 26, 2024 · 0 comments
Open

Add support for Node.js Subpath Imports #263

in-in opened this issue Mar 26, 2024 · 0 comments

Comments

@in-in
Copy link

in-in commented Mar 26, 2024

Is your feature request related to a problem? Please describe.
I tried using Subpath imports but they don't work. It would be great if it were possible to use native way no configure paths.

Describe the solution you'd like
Subpath imports should work the same way as aliases from tsconfig.json work now.

Describe alternatives you've considered
I don't know any alternatives for Subpath imports

Additional context
Article: https://betterprogramming.pub/the-native-way-to-configure-path-aliases-in-frontend-projects-5db70f19a6e0
Docs: https://nodejs.org/api/packages.html#subpath-imports

Now the plugin works in two cases:
relative path import styles from "../styles/Home.module.css";

24086110815

alias from tsconfig.json import styles from "@/styles/Home.module.css";

24086111007

But if you use subpath imports you get an error:
import styles from "#styles/Home.module.css";

24086111142

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