Seems like livereactload is making paths absolute
See original GitHub issueSuppose that I run this:
browserify a.js -r ./scripts/components/b.js -o c.js
Now a.js
can require b.js
by calling require('/scripts/components/b.js')
. But if I add -p livereactload to the above that require will fail. Reading the compiled code I tried require('/Users/x/y/z/w/scripts/components/b.js')
(the absolute path in my filesystem) and it worked. It seems like livereactload
is somehow making paths absolute in compiled file. Is it possible to avoid this?
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
What are the differences between absolute and relative paths?
An absolute path makes no assumptions about your current location in relation to the location of the file or directory it's describing.
Read more >Make absolute paths relative to the project root in Webpack
I.e. I want to do import foo from '/actions/fooAction' instead. I tried setting Webpack's resolve.root option, but it didn't seem to do anything ......
Read more >Next.js Tutorial - 59 - Absolute Imports & Module Paths
Courses - https://learn.codevolution.dev/⚡️ Checkout Taskade! https://www.taskade.com/ Support UPI - https://support.codevolution.dev/ ...
Read more >Path | Node.js v19.3.0 Documentation
The path.resolve() method resolves a sequence of paths or path segments into an absolute path. The given sequence of paths is processed from...
Read more >What Is a Path? (And Other File System Facts)
An absolute path always contains the root element and the complete directory ... In the following figure, logFile appears to be a regular...
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 Free
Top 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
Released
3.1.1
which should fix the source maps bug. However, the original absolute path issue may remain so still keeping this open.@arcticShadow Check out PR #138 . It might help these problems. If not, please reply in the PR since I think it’s related.