tleunen / find-babel-config

Find the closest babel config based on a directory
MIT License
13 stars 7 forks source link

Issue with relative path due to process.cwd() inconsistent across platforms #35

Open samit4me opened 5 years ago

samit4me commented 5 years ago

When using vscode the current working directory can be inconsistent across platforms, see https://github.com/Microsoft/vscode/issues/47195.

More details with example projects can be found in this issue https://github.com/HeroProtagonist/eslint-plugin-module-resolver/issues/15.

One possible solution would be to use __dirname (e.g. const [projectRoot] = path.resolve(__dirname).split("/node_modules")).