-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build Calypso for multiple targets: fallback and evergreen. (#30768)
Thi PR reworks the build infrastructure to support two separate builds, and to serve the correct one to each user, based on user agent string. Squashed commits: Unify browserslist usage based on package.json. This commit: - Uses the browserslist definition to configure Terser ES6 and browser-specific settings. - Prepares package.json for multiple browserslists, to enable builds for multiple targets. - Defines the BROWSERSLIST_ENV environment variable in the NPM scripts, which is used by all browserslist-aware tools to pick the right configuration. Hardcode IE8 support to false Add documentation for chooseTerserEcmaVersion function. Make Calypso generate two builds: evergreen and fallback. We currently have a single, fallback build, which includes support for every supported browser. This results in a large amount of polyfills and syntactic transformations which bloat the bundle and increase browser download and execution times. This PR aims to generate a separate evergreen build in production, and serve that build instead to evergreen browsers, by doing user agent detection. Other browsers will still work, since they have the fallback bundle, but known modern browsers will get the benefit of a smaller bundle. Remove assignment from noModule property. Write fallback build files to public/fallback. Fix dev builds and make them use 'evergreen' settings. Rename isEvergreen prop to addEvergreenCheck Only run AssetsWriter for client builds. Ensure non-client builds use defaults instead of evergreen. Remove unreleased Safari versions from browserslist. Make fallback and evergreen builds happen in parallel. Fix arrow functions being used as constructors Ensure that BROWSERSLIST_ENV is always defined in WebPack Remove NODE_ARGS from build-client-both Ensure that `analyze-bundles` correctly uses the evergreen build. Ensure that icfy-analyze.js uses the evergreen build. Fix build cache paths after changes to the build process.
- Loading branch information
Showing
14 changed files
with
523 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.