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

Hello, please ask a question, using linux path configuration, will it parse correctly on windows? #156

Open
qingaoti opened this issue Jun 1, 2024 · 0 comments

Comments

@qingaoti
Copy link

qingaoti commented Jun 1, 2024

as follows:

using linux path configuration
[ 'babel-plugin-root-import', { rootPathSuffix : "./node/", rootPathPrefix : '@/', }, ],

The two file locations are as follows:
F:\work\code\在水医方\zk-server\node\__test__\simple-text-diff-test.js
F:\work\code\在水医方\zk-server\node\config\testImport.js

Run in windows environment
image

code:
image

be commented out:
import testimport2 from '@/config/testimport';
console.log('testimport2:', testimport2);

[simple-text-diff-test.js:23] Current directory: F:\work\code\在水医方\zk-server\node\__test__
[simple-text-diff-test.js:33] Error resolving "@/config/testimport": Error: Cannot find module './node/config/testimport'
[simple-text-diff-test.js:37] Resolved path using path.resolve for "@/config/testimport": F:\work\code\在水医方\zk-server\node\__test__\@\config\testimport

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