From 24aae858b9c197feb691444909f1d337541e970e Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 25 Apr 2021 17:18:06 +0200 Subject: [PATCH] Add a note about minification to the webpack-example README (issue 13290) Since we really don't want to let a particular Webpack-mode dictate how we can/can't write code, let's add a note in the webpack-example README about minification instead. --- examples/webpack/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/webpack/README.md b/examples/webpack/README.md index 920e4d3e2..c7ebd3b0a 100644 --- a/examples/webpack/README.md +++ b/examples/webpack/README.md @@ -18,6 +18,12 @@ Refer to the `main.js` and `webpack.config.js` files for the source code. Note that PDF.js packaging requires packaging of the main application and the worker code, and the `workerSrc` path shall be set to the latter file. +### Minification + +If you are configuring Webpack to output a minified build, please note that you +*must* configure the minifier to keep original class/function names intact; +otherwise the build is not guaranteed to work correctly. + ## Worker loading If you are getting the `Setting up fake worker` warning, make sure you are