We need to add the following to webpack.config.js
: optimization: minimizer: [new UglifyJsPlugin({ cache: process.platform !== "win32" })]
, to help avoid the path length restriction on Windows. I ran into this today on a machine where I don't have admin access to make a change to the registry.
I was getting paths like the following: node_modules\\\\.cache\\\\uglifyjs-webpack-plugin\\\\content-v2\\\\sha512\\\\f0\\\\d9\\\\41b44207c2fa7189a30f3b6aeb8e22585bd4b0a78f8de3894c218f5b16de8ff9e48f3e54f767f6f69f99b6ba0a41538dd5b163d436d72ceb0ba4f3d4fbd
We should also consider making dev_build
the default option for jupyter lab build
(and labextension install
), and only uglify when explicitly asked, to avoid taking up large amounts of CPU, RAM, and time.
I agree that a dev build is preferable much of the time (maybe we should only uglify upon publishing the JS bundle to pypi/conda?).
Yeah, we would definitely do that, and folks that are making a build to distribute would do the same, but for most local users the unminified version should be a fine default.
We should also consider making dev_build the default option for jupyter lab build (and labextension install), and only uglify when explicitly asked, to avoid taking up large amounts of CPU, RAM, and time.
That makes sense to me. Often build's are just done locally and minifying resources just for local use isn't that necessary.
Most helpful comment
Yeah, we would definitely do that, and folks that are making a build to distribute would do the same, but for most local users the unminified version should be a fine default.