package
Broccoli filter to minify files with terser while preserving their sourcemaps.
npm install broccoli-terser-sourcemapGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Registry package owners.
A broccoli filter that applies terser to minify code while properly generating or maintaining sourcemaps.
npm install --save broccoli-terser-sourcemapconst Terser = require('broccoli-terser-sourcemap');
// basic usage
let minified = new Terser(input);
// advanced usage
let minified = new Terser(input, {
exclude: [..], // array of globs, to not minify
terser: {
mangle: false, // defaults to true
compress: false, // defaults to true
sourceMap: false, // defaults to true
//...
},
publicUrl: 'https://myamazingapp.com/', // value to be prepended to sourceMappingURL, defaults to ''
hiddenSourceMap: false, // skips adding the reference to sourcemap in the minified JS, defaults to false
concurrency: 3
To disable parallelization:
$ JOBS=0
$ JOBS=1Estimated unpacked size across 34 packages.
6.6 MB
Includes dependencies.
10 direct · 3 outdated
^4.3.1
4.4.3
^5.7.0
5.51.2
^2.2.0
4.0.2
^6.1.5
10.0.3
^4.0.7
6.0.0
^1.0.5
1.0.5
^4.6.1
4.6.1