Socket
Socket
Sign inDemoInstall

broccoli-terser-sourcemap

Package Overview
Dependencies
59
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    broccoli-terser-sourcemap

Broccoli filter to minify files with terser while preserving their sourcemaps.


Version published
Maintainers
3
Install size
7.83 MB
Created

Changelog

Source

v4.1.1 (2023-10-31)

:bug: Bug Fix
  • #313 fix: Fix sourcemap file lookup (@mydea)
:house: Internal
Committers: 3

Readme

Source

Build Status

A broccoli filter that applies terser to minify code while properly generating or maintaining sourcemaps.

installation

npm install --save broccoli-terser-sourcemap

usage

const 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 // number of parallel workers, defaults to number of CPUs - 1
});

To disable parallelization:

$ JOBS=0
$ JOBS=1

FAQs

Last updated on 31 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc