-
Notifications
You must be signed in to change notification settings - Fork 51
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
can not resolve to correct path when used with webpack5 #60
Comments
same problem, fallbacked to resolve.alias :( |
I too have switched to resolve aliases to work around this; I had this this previously and assumed it was my fault, but there's something going on in the plugin. It's not too much code to read paths and produce aliases, and the output is the same (but it actually works in cases where the file names conflict between paths). |
Any progress please ? |
Any progress? |
1 similar comment
Any progress? |
Any brogress? |
Guys, if you get an error with ESLint not seeing the paths or just any other error in this crazy configuration world,here is what helped me:
It shows how to add paths in tsconfig.json
Here is how to solve them: https://github.com/import-js/eslint-import-resolver-typescript?tab=readme-ov-file] Walk through this guide, installation and config .eslintrc file
Also, if you struggle and can't fix this, I'll leave my repo with pretty serious configuration: (Webpack + React + TypeScript + ESLint + Prettier + Husky + Babel) |
1 similar comment
Guys, if you get an error with ESLint not seeing the paths or just any other error in this crazy configuration world,here is what helped me:
It shows how to add paths in tsconfig.json
Here is how to solve them: https://github.com/import-js/eslint-import-resolver-typescript?tab=readme-ov-file] Walk through this guide, installation and config .eslintrc file
Also, if you struggle and can't fix this, I'll leave my repo with pretty serious configuration: (Webpack + React + TypeScript + ESLint + Prettier + Husky + Babel) |
here is a minimum repo to show this bug: https://github.com/gespiton/tsconfigplugin-issue-with-webpack-5
The test file in packages/fullscreen couldn't be correctly resolved. If we check the output bundle js file we will see
noted that on the last line, the file path is
./src/test.ts
, which resolves to the fileapplication/src/test.ts
. While the correct resolve path should be like../packages/fullscreen/src/test.ts
(in webpack 4).I suppose this has something to do with how webpack5 distinguishes files. But I don't have the knowledge to solve this bug. Wish someone could look into it. For now, I'm planning to use webpack resolve.alias instead of this plugin.
The text was updated successfully, but these errors were encountered: