Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.

feat: precompile assets on build#2091

Merged
BinaryMuse merged 15 commits intomasterfrom
mkt/precompile-assets
Feb 14, 2019
Merged

feat: precompile assets on build#2091
BinaryMuse merged 15 commits intomasterfrom
mkt/precompile-assets

Conversation

@BinaryMuse
Copy link
Contributor

Currently we compile and serve JS and CSS from memory when those files are requested, resulting in significant delays for many requests. This PR implements precompilation for production mode.

Fixes #2084

@electron-bot electron-bot temporarily deployed to electron-website-pr-2091 February 8, 2019 22:27 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2091 February 8, 2019 22:44 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2091 February 8, 2019 22:46 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2091 February 8, 2019 22:53 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2091 February 8, 2019 23:45 Inactive
Copy link
Contributor

@vhashimotoo vhashimotoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More questions going latest (maybe).

  1. How to verify if we load precompiled assets?

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not the cross-platform able solution, what about the switch to Node for cross-platform running?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. I'll do that today.

Copy link
Member

@Kilian Kilian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @HashimotoYT that a node script would be easier. other than that 👍

@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2091 February 14, 2019 18:55 Inactive
@BinaryMuse
Copy link
Contributor Author

I've updated the script to be in JavaScript; I was also able to save about 15% of the bundle size by modifying our lodash imports.

@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2091 February 14, 2019 18:57 Inactive
Copy link
Contributor

@vhashimotoo vhashimotoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍏 for me. Only one proposal.

@BinaryMuse BinaryMuse merged commit 7eea09b into master Feb 14, 2019
@BinaryMuse BinaryMuse deleted the mkt/precompile-assets branch February 14, 2019 20:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants