From 39261af940cff85fb1813c572429a2f2d6fa56cd Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sun, 22 Jul 2018 17:39:20 +0200 Subject: [PATCH] Keep function names when building examples --- examples/webpack/config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/webpack/config.js b/examples/webpack/config.js index d5db5e4ee8..47003ebd4d 100644 --- a/examples/webpack/config.js +++ b/examples/webpack/config.js @@ -1,3 +1,4 @@ +const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); const CopyPlugin = require('copy-webpack-plugin'); const ExampleBuilder = require('./example-builder'); const fs = require('fs'); @@ -31,6 +32,16 @@ module.exports = { }] }, optimization: { + minimizer: [ + new UglifyJsPlugin({ + sourceMap: true, + uglifyOptions: { + mangle: { + keep_fnames: true + } + } + }) + ], runtimeChunk: { name: 'common' },