You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically I'd just like to have my src/ directory as the root directory of my project and be able to use absolute paths that would originate from this root directory.
In this case, using /images/room.png in the img tag should look for the image file at src/images/room.png since src/ is the root path.
😯 Current Behavior
Instead, it adds a ton of ../ tokens to the path when it is defined as an absolute path. I know I did not define the root directory because I have no idea how. Looked through the "docs" and throughout the github issues and couldn't find any indication of it. I would assume that it's possible to set it in the options (since it's a very basic feature) but can't find how.
Regardless of setting the root path, it still doesn't make sense to me why the path gets prepended with all these ../. I would expect it to tell me it can't find the resource, but not modify the path in such a weird way. Here's the error message I get:
🚨 /[PROJECT]/src/pages/index.html: Cannot resolve dependency './../../../../../../images/room.png' at '/images/room.png'
at /[PROJECT]/node_modules/browser-resolve/node_modules/resolve/lib/async.js:55:21
at load (/[PROJECT]/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
at onex (/[PROJECT]/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
at /[PROJECT]/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:166:21)
Anyone has an idea about why this would be happening ? Also how do I set the root directory for absolute paths ?
🌍 My Environment
Software
Version(s)
Parcel
1.6.2
Node
9.3.0
yarn
1.3.2
Operating System
macOS High Sierra
The text was updated successfully, but these errors were encountered:
🐛 bug report
🎛 Configuration
package.json
:cli command:
parcel src/pages/index.html
💻 Code Sample
src/pages/index.html
🤔 Expected Behavior
Basically I'd just like to have my
src/
directory as the root directory of my project and be able to use absolute paths that would originate from this root directory.In this case, using
/images/room.png
in the img tag should look for the image file atsrc/images/room.png
sincesrc/
is the root path.😯 Current Behavior
Instead, it adds a ton of
../
tokens to the path when it is defined as an absolute path. I know I did not define the root directory because I have no idea how. Looked through the "docs" and throughout the github issues and couldn't find any indication of it. I would assume that it's possible to set it in the options (since it's a very basic feature) but can't find how.Regardless of setting the root path, it still doesn't make sense to me why the path gets prepended with all these
../
. I would expect it to tell me it can't find the resource, but not modify the path in such a weird way. Here's the error message I get:Anyone has an idea about why this would be happening ? Also how do I set the root directory for absolute paths ?
🌍 My Environment
The text was updated successfully, but these errors were encountered: