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
I was wondering if there's any way to be able to build from a tmp/ folder in Parcel2. I was able to do this fairly easily with Parcel1, however, I wanted to upgrade due to frequent issues with the watcher. However, I'm running into issues getting it to work with my project's structure.
I have template files within my src/ folder which then get build into the tmp/ folder. I then wanted parcel to build from the tmp/ folder into the public/ folder, however, it has issues finding referenced assets as it is looking for paths in relation to the project's root rather than within the tmp folder. For example, I have HTML lines such as:
This reference makes the project end up looking for the file in Project/style/styles.css rather than Project/tmp/style/styles.css. I can't really prepend /tmp to the start of the references as that will end up messing up the build process that gets the files into the tmp folder to being with.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was wondering if there's any way to be able to build from a tmp/ folder in Parcel2. I was able to do this fairly easily with Parcel1, however, I wanted to upgrade due to frequent issues with the watcher. However, I'm running into issues getting it to work with my project's structure.
I have my folder structure set out like this:
I have template files within my src/ folder which then get build into the tmp/ folder. I then wanted parcel to build from the tmp/ folder into the public/ folder, however, it has issues finding referenced assets as it is looking for paths in relation to the project's root rather than within the tmp folder. For example, I have HTML lines such as:
<link rel="stylesheet" type="text/css" href="/style/styles.css">
This reference makes the project end up looking for the file in Project/style/styles.css rather than Project/tmp/style/styles.css. I can't really prepend /tmp to the start of the references as that will end up messing up the build process that gets the files into the tmp folder to being with.
A very bare-bones version of my project can be found here for reference: https://github.com/JohnEidum/parcel-test
Beta Was this translation helpful? Give feedback.
All reactions