Minified javascript in a plugin causes optimizer to take a long time


(Robert) #1

Hi there
I creating a plugin for kibana 6 , That requires the use of a minified JavaScript library that is proprietary, the file is sadly approximately 2.5Mb. This causes webpack to take a ages >40+ mins to optimize and cache the bundles. In the plugin I am doing require('proprietary -lib.min.js')

I looking on the web I added the library path to this.env.noParse in base_optimizer.js but it is not improving the optimizer time. If anyone has any ideas that be great. Sadly I can not change the library code.


(Jon Budzenski) #2

Is this for a deployment or in development mode? In either case I'd recommend atleast 4GB of ram for the machine installing the plugin.

For production you can optimize on a beefier machine and then zip the whole package up for sending to a more resource constrained server.

For development I'd have to dig further if hardware isn't the cause. Bumping max old space size is worth a try (NODE_OPTIONS=--max_old_space_size=4096).


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.