Questions tagged [terser]

Terser is a JavaScript parser and mangler/compressor toolkit for ES6+ (ECMAScript 6+ / JavaScript 6+)

Terser is a JavaScript parser and mangler/compressor toolkit for ES6+ (ECMAScript 6+ / JavaScript 6+). It is a fork of uglify-es which doesn't support ES6+ any longer.

128 questions
0
votes
1 answer

Unable to get OBR segment from HL7 REF^I12 message

I was working on HL7 (2.3.1) message of REF^I12 type. I'm trying to get the OBR segment from the message by using terser, but, I'm getting null whenever I try to get OBR or OBX segment values. Below is the hl7 message I'm trying to…
0
votes
1 answer

Minification-safe catch parameter in Javascript?

After minifying my JavaScript application using webpack's Terser plugin, this catch function does not run correctly in the browser .catch((error)=> { vm.loginError = true; vm.loading = false; if (!error…
rikuwolf
  • 103
  • 2
  • 10
0
votes
1 answer

Webpack, babel - node_modules are not excluded from bundle

I'm trying to figure out whats wrong with my babel, webpack configuration. After build I have node_modules inside my bundle I tried different configuration of .babel-rc, terser and awesome-typescript-loader (exclude /node_modules/) but node_modules…
0
votes
1 answer

Rails, Webpacker, Terser keep_fnames

Trying to avoid webpacker:compile from removing function names. Tried Terser and even babel-plugin-minify-mangle-names. So far no go. Apologies for the detailed long explanation. My setup: Rails 5.2 with gem 'webpacker', '~> 4.0.7' package.json { …
Ben
  • 2,957
  • 2
  • 27
  • 55
0
votes
3 answers

rails webpack compilation hangs in production at 78% [0] chunk asset optimization TerserPlugin

I am using Rails 5 with webpack, trying to compile for production because the assets don't show up in production. If I try NODE_ENV=production rake webpacker:compile, then it hangs at Compiling.... After reading Compiling in production fails…
user2453676
  • 470
  • 9
  • 16
0
votes
0 answers

Uglify Remove console.log.bind with pure_funcs

I am trying to optimize out binded console.log statements in minified js. I am binding console.log so that I can have an argument prepended by default. The pure_funcs setting of uglifyjs doesn't appear to work (see output below) drop_console is even…
Salami
  • 2,849
  • 4
  • 24
  • 33
0
votes
0 answers

How do I convert babel + terser workflow to webpack?

My folder structure looks like this: - src/internal-logic.js - src/header.js - src/footer.js - package.json Here is a section of my package.json "scripts": { "start": "npx babel --watch src --out-dir dist --presets react-app/prod", …
Ranjith Ramachandra
  • 10,399
  • 14
  • 59
  • 96
-1
votes
1 answer

Npm scripts - how to minify files from a folder and save them into another?

I'm using npm scripts to compile and minify sass and potentionally javascript files. However, I'm looking for at way to specify a source folder of *.js files and have them minified and saved in a destination folder individually - (flattened, not…
Meek
  • 3,086
  • 9
  • 38
  • 64
1 2 3
8
9