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
Description:
When packaging an Electron application using Parcel, if the application's installation path contains a closing parenthesis ), resources fail to load properly. This occurs because the generated runtime.js incorrectly truncates the base URL at the closing parenthesis when using string splitting in the getBundleURL function.
Steps to Reproduce:
Create an Electron app with Parcel bundling
Package the application using parcel build
Place the built application in a path containing closing parenthesis (e.g., C:/test/test ) folder/dist/)
Launch the packaged application
Observe failed resource loading in DevTools console
Expected Result:
Application should load resources normally regardless of special characters in the path.
Actual Result:
Resources fail to load with network errors. The generated base URL in runtime.js becomes truncated:
// Current broken output:constbaseUrl="file:///C:/test/test "// Truncated at closing parenthesis// Expected behavior:constbaseUrl="file:///C:/test/test ) folder/dist/"// Full path with escaped characters
Root Cause Analysis:
The issue originates from how index.runtime.[public-id].js calculates the base URL:
The current implementation uses simple string splitting that doesn't account for special characters like closing parentheses, causing incorrect path resolution.
Environment:
OS: Windows 10/11 (path-related issue)
Parcel version: 2.13.3
Possible Solutions:
While I'm aware the v2 branch has adopted a revised implementation, I'm uncertain whether path-related issues (like parenthesis truncation) could still manifest.
The text was updated successfully, but these errors were encountered:
Description:
When packaging an Electron application using Parcel, if the application's installation path contains a closing parenthesis ), resources fail to load properly. This occurs because the generated runtime.js incorrectly truncates the base URL at the closing parenthesis when using string splitting in the getBundleURL function.
Steps to Reproduce:
Create an Electron app with Parcel bundling
Package the application using parcel build
Place the built application in a path containing closing parenthesis (e.g., C:/test/test ) folder/dist/)
Launch the packaged application
Observe failed resource loading in DevTools console
Expected Result:
Application should load resources normally regardless of special characters in the path.
Actual Result:
Resources fail to load with network errors. The generated base URL in runtime.js becomes truncated:
Root Cause Analysis:
The issue originates from how index.runtime.[public-id].js calculates the base URL:
The current implementation uses simple string splitting that doesn't account for special characters like closing parentheses, causing incorrect path resolution.
Environment:
OS: Windows 10/11 (path-related issue)
Parcel version: 2.13.3
Possible Solutions:
While I'm aware the v2 branch has adopted a revised implementation, I'm uncertain whether path-related issues (like parenthesis truncation) could still manifest.
The text was updated successfully, but these errors were encountered: