This loader is not working with absolute paths.
See original GitHub issueBug description
I try to use this loader in scope of WebPack configuration right now, but as fact that I have a very big project and around all files we are using absolute paths, when I try to make a build a get more than 359 errors related to the path. I can’t find the ability to add some configuration or additional plugin. But the way to update each file is a little bit crazy for me. )
Reproduction
Use absolute files in your project
Node.js package manager
yarn
Environment
Node: v14.17.0
NPM: 8.6.0
Webpack: 5.62.1
Can you contribute a fix?
- I’m interested in opening a pull request for this issue.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
I can not import with absolute path in Storybook · Issue #3916
This seems to be caused by loading with an absolute path, so if you do the following it works fine. import ChildrenComponent from...
Read more >typescript absolute paths not working with js or jsx files
This seems to be an issue only when using absolute paths. Updated the config to just use ts-loader. The error still pops up....
Read more >Module Resolution - webpack
A resolver is a library which helps in locating a module by its absolute path. A module can be required as a dependency...
Read more >How to change relative paths to absolute paths for imports
Here is a documentation of the places that require configurations for getting the absolute paths working. Our tests do not go…
Read more >"Error: Detected an absolute file path. Paths starting with '/' are ...
To solve this, users need to use a relative path instead of an absolute path. This means that the reference is no longer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, I also think so. But it was working before I replaced the loader (from babel to esbuild). There is my configuration of 3 main files that is responsible for bundling. Maybe, I have to add some additional plugin or replace ‘module-resolver’ that is responsible for the path (as I understand).
Okay! Thank you!