Skip to content

change default aliases to be more like node's subpath aliases #5847

@weepy

Description

@weepy

Describe the problem

I want to run a node test runner to test parts of my application, but it doesn't understand the "$lib" type aliases.
I tried the node package module-alias but it appears difficult to use with es6.
Node already has support for subpath aliases, but they must begin with "#", so currently I am changing the sveltekit to use "#lib" via :

vite: {
			resolve: {
				alias: {
					'#lib': path.resolve('./src/lib')
				}
			}
		}

which is not a bad solution, but perhaps parity with node should be the default?

Describe the proposed solution

"$lib" changed to "#lib"

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions