This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a dev-only config for webpack and optimize main build for production
Summary: This diff optimizes our `webpack.config.js` for production by pointing to the React production build (to disable `PropType` validation, which is quite slow), enabling Uglify, and disabling source maps. In addition, it defines a separate `webpack.config.dev.js` which reverts all of these changes and an `npm run watch` command that points to the dev settings. This is a similar setup to what we have for our mobile JS (see [here](https://github.com/Khan/mobile-client-webview-resources/tree/master/javascript)). On Asana @ https://app.asana.com/0/114493820703878/119470924649091. Test Plan: - Run `webpack`. - Verify that the produced build is relatively small (< 400 KB). - Open up the keypad. - Enable profiling in Devtools. - Swipe around a bit. - Verify that there is no `PropType` validation going on. - Run `npm run watch`. - Verify that the produced build is much larger (~2 MB). - Verify that `PropType` validation is back. Reviewers: kevinb Reviewed By: kevinb Differential Revision: https://phabricator.khanacademy.org/D27229
- Loading branch information