React SSR with parcel 2: Problem with file paths with "file:///" instead of URLs #9056
Unanswered
MichaelYehorov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm moving from Parcel 1 to Parcel 2 with my react SSR project and I have this problem: asset paths (like SVG or fonts) are being imported by this line:
$3315a98ea5592134$exports = new URL("form-return.f796c309.svg", "file:" + __filename).toString();
This is OK if it was just a node app, but this is react-SSR and I need it to be a URL, just like in Parcel 1. Otherwise in the browser it tries to reference file-url too.
Here are my configs:
package.json
.parcelrc
tsconfig.json
Also tried this tsconfig variant:
Beta Was this translation helpful? Give feedback.
All reactions