-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] relative file paths get compiled to backslash paths #1990
Comments
Additionally I could observe this behaviour in my entry html file, where relative file paths get compiled and replaced by windows-style relative paths. |
I second this, Our electron application is built from windows machines resulting in backslashes beeing used for all platforms. It is a good idea to use forward slashes as default but also giving the user to option to override this behavior per option as a electron applications will have target specific builds. |
I just ran into this same issue trying to load a service worker. I see this is marked as [Help Wanted], any hints on where to get started with fixing this? |
Also, does anyone have a workaround in the meantime? |
My guess is since we fixed path joins with packages/core/parcel-bundler/src/Resolver.js contains the logic for resolving paths in assets IIRC, so we should check if paths are resolved with directory separators in the right way. I might be wrong this is just what I can recall on the run right now. |
same problem here. I'm compiling a WebExtension on Windows, all paths get converted: "assets/css" -> "assets\css" And the compiled manifest.json is no longer valid json. \c is a bad escaped character. |
This is still a problem which I think should be fixed but here is a quick solution:
You have to use FYI |
Also I am noticing that the referenced local file for the compiled js is |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. |
🐛 bug report
🎛 Configuration (
index.html
,manifest.webmanifest
)🤔 Expected Behavior
Paths should get transpiled to dist folder using forward slashes (
/
)😯 Current Behavior
Transpiled paths are actually relative windows paths
💁 Possible Solution
Asset files referenced in
manifest.webmanifest
should get translated into forward-slashed paths based on either relative or absolute directory base. I found an issue about that, see Context.🔦 Context
index.html
is my entry file referencingmanifest.webmanifest
.It seems when I reference the files used in web manifest (eg. using
<a href="src">[...]</a>
) these files get the relative using back slashes because I'm using windows.When I don't reference these files anywhere else in my html file everything works as intended, paths wont get messed up.
💻 Code Sample
https://github.com/peanutbother/parcel-bundler-manifest-issue
🌍 Your Environment
The text was updated successfully, but these errors were encountered: