Skip to content
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

[1.4.1rc2] JS minification can cause issues with third party plugins, nuking all of packed_plugins.js #3640

Closed
foosel opened this issue Jul 10, 2020 · 3 comments
Labels
done Done but not yet released improvement Improving functionality, behaviour, UX, ...
Milestone

Comments

@foosel
Copy link
Member

foosel commented Jul 10, 2020

Problem

New default of minifying JS assets from third party plugins can cause issues if that triggers Syntax Errors inside one or more third party plugins. As SyntaxErrors cannot be caught, any such issue will effectively nuke the whole packed_plugins.js bundle.

See also Sebclem/OctoPrint-SimpleEmergencyStop#14 and FormerLurker/Octolapse#567

Solution

Disable minification again by default, at least for anything involving third party plugins, as it was prior to 1.4.1.

Note

The old behaviour can be enforced again and thus the above problem avoided by setting

devel:
  webassets:
    minify: false

in config.yaml.

@foosel foosel added this to the 1.4.1 milestone Jul 10, 2020
@GitIssueBot GitIssueBot added the triage This issue needs triage label Jul 10, 2020
@foosel foosel added improvement Improving functionality, behaviour, UX, ... and removed triage This issue needs triage labels Jul 10, 2020
foosel added a commit that referenced this issue Jul 10, 2020
@foosel foosel added the done Done but not yet released label Jul 10, 2020
@FormerLurker
Copy link

@foosel, could you stuff the JS from each plugin into a separate file and minify each separately?

@foosel
Copy link
Member Author

foosel commented Jul 11, 2020

I could, but that would defeat the whole point of bundling the assets together to avoid a flood of requests needed to load the page. And we really want to avoid that as it increases page load times (and server load) significantly.

foosel added a commit that referenced this issue Jul 13, 2020
As suggested in @b-morgan in #3638, to allow plugin authors to detect
minification issues with their code during development.

See also #3640
@foosel
Copy link
Member Author

foosel commented Jul 15, 2020

1.4.1rc3 has been released

@foosel foosel closed this as completed Jul 15, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
done Done but not yet released improvement Improving functionality, behaviour, UX, ...
Projects
None yet
Development

No branches or pull requests

3 participants