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

the getAbsoluteMappingEntries in lib/mapping-entry.js can't resolve absolute path. #181

Open
WilkinWendy opened this issue Nov 2, 2021 · 0 comments

Comments

@WilkinWendy
Copy link

WilkinWendy commented Nov 2, 2021

version:
3.11.0
problem:
the getAbsoluteMappingEntries in lib/mapping-entry.js can't resolve absolute path.

ex:
I use eslint which imported this package.
when I config tsconfig.json as below

{
	"compilerOptions": {	
		"paths": {
			"@/*": [
				"src/*",
				"/var/fold1/src/*"
			],
		}
	}
}

The path /var/fold1/src/* would be resolved as /.../var/fold1/src/* rather than /var/fold1/src/*

Causes as below

absolutePaths.push({
    pattern: key,
    paths: paths[key].map(function (pathToResolve) {
        return path.join(absoluteBaseUrl, pathToResolve);
    }),
});

path.join would not resolve absolute path correctly

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