From fb7bab6c272bdc2aff05c68caba1b3edbe93d8c8 Mon Sep 17 00:00:00 2001 From: Ricky Reusser Date: Mon, 2 Oct 2017 16:17:49 -0700 Subject: [PATCH] Remove bundle-collapser browserify recommendation (#11051) * Move bundle-collapser browserify plugin recommendation to a note. * Remove bundle-collapser note entirely --- docs/docs/optimizing-performance.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/docs/optimizing-performance.md b/docs/docs/optimizing-performance.md index ab4022b9df..53098cf41a 100644 --- a/docs/docs/optimizing-performance.md +++ b/docs/docs/optimizing-performance.md @@ -74,17 +74,16 @@ For the most efficient Browserify production build, install a few plugins: ``` # If you use npm -npm install --save-dev bundle-collapser envify uglify-js uglifyify +npm install --save-dev envify uglify-js uglifyify # If you use Yarn -yarn add --dev bundle-collapser envify uglify-js uglifyify +yarn add --dev envify uglify-js uglifyify ``` To create a production build, make sure that you add these transforms **(the order matters)**: * The [`envify`](https://github.com/hughsk/envify) transform ensures the right build environment is set. Make it global (`-g`). * The [`uglifyify`](https://github.com/hughsk/uglifyify) transform removes development imports. Make it global too (`-g`). -* The [`bundle-collapser`](https://github.com/substack/bundle-collapser) plugin replaces long module IDs with numbers. * Finally, the resulting bundle is piped to [`uglify-js`](https://github.com/mishoo/UglifyJS2) for mangling ([read why](https://github.com/hughsk/uglifyify#motivationusage)). For example: @@ -93,7 +92,6 @@ For example: browserify ./index.js \ -g [ envify --NODE_ENV production ] \ -g uglifyify \ - -p bundle-collapser/plugin \ | uglifyjs --compress --mangle > ./bundle.js ```