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

Update minifier.js to remove server and development code #10056

Closed
wants to merge 2 commits into from
Closed

Update minifier.js to remove server and development code #10056

wants to merge 2 commits into from

Commits on Jul 5, 2018

  1. Update minifier.js to remove server and development code

    A very simple change inspired by https://github.com/ssrwpo/uglifyjs2 to remove server (`Meteor.isServer`) and development code (`Meteor.isDevelopment`) easily (and speeds up client-side execution by removing `Meteor.isClient` and `Meteor.isProduction`)
    
    We do this by search-replacing first to get simple var names (UGLIFYJS_FALSE and UGLIFYJS_TRUE) for `terser` to replace during conditional compilation
    
    Notes: 
    1. In addition to reducing JS load, removing server-side code is desirable for security purposes (and protecting server-side code as well)
    2. Tested in production and works great
    ramezrafla committed Jul 5, 2018
    1 Configuration menu
    Copy the full SHA
    9fffeac View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2018

  1. Better regex matching

    ramezrafla committed Jul 15, 2018
    Configuration menu
    Copy the full SHA
    f71efc2 View commit details
    Browse the repository at this point in the history