-
Notifications
You must be signed in to change notification settings - Fork 324
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
Fix issues with missing sourcemaps #6572
Conversation
7459599
to
639cb7f
Compare
oh @mwu-tow you might want to check that this fixes the issue. |
@somebody1234 We've been really very aggressively trying to keep the size down, so increasing the core download size might be somewhat iffy. |
@mwu-tow we don't serve |
alternatively i can just take the |
The preload script is loaded by the Electron before loading the actual site, it is shipped and served. I think it does not show up because the server does not serve files from the root of the resources but only from the |
/** Construct a URL query string with the given parameters. For each `key` - `value` pair, | ||
* `key=value` will be added to the query. */ | ||
export function urlParamsFromObject(obj: Record<string, string>) { | ||
const params = [] | ||
for (const [key, value] of Object.entries(obj)) { | ||
params.push(`${key}=${encodeURIComponent(value)}`) | ||
} | ||
return params.length === 0 ? '' : '?' + params.join('&') | ||
const params = new URLSearchParams(obj).toString() | ||
return params ? '?' + params : '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really neat change, yet at the same time, it got me thinking, about whether we need this function at all. It being string
-ly typed is a code smell to me.
Perhaps we can construct URL by using the URL API rather than by pretty-printing pieces of text together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately it seems even the url api requires properties to be string
s... but i think it might be a good idea to completely remove urlParamsFromObject
anyway as the URL APIs can do the same thing?
@@ -110,7 +109,10 @@ export class Server { | |||
} else { | |||
const url = requestUrl.split('?')[0] | |||
const resource = url === '/' ? '/index.html' : requestUrl | |||
const resourceFile = `${this.config.dir}${resource}` | |||
const resourceFile = | |||
resource === '/preload.cjs.map' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment on why this single file needs special treatment here.
🟢 Did QA, the issue is fixed. Thanks for taking care of it! |
…ing-6287 * develop: Fix issues with missing sourcemaps (#6572) Fix asset delete; implement project delete and project rename (#6566) Fix #6377: Change ctrl-r shortcut (#6620) Add tests for Date.until, Date.next and Date.previous. (#6606) Improve `Non_Unique_Primary_Key` error, split file format detection into read/write, improve SQLite format detection (#6604) tokenize_to_columns or parse_to_columns results in a single column we shouldn't add the 1 (#6607) Fix node editing race condition (#6594) Add format to the in-memory Column (#6538) Fix dashboard issues (part 2) (#6511) Fix visualisation type selector artifacts rendered after node preview visualisation was closed. (#6575) Revert typescript CI Lint changes (#6602) Fix the Engine version check in GUI (#6570)
Pull Request Description
Fixes #6559:
Important Notes
None
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.