question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This loader is not working with absolute paths.

See original GitHub issue

Bug 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:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maksym-nezhurincommented, Aug 12, 2022

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).

0reactions
maksym-nezhurincommented, Aug 12, 2022

Okay! Thank you!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found