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
4
votes
0 answers

Component name gets minified

I am actually fetching component name for logging purpose. What i noticed is that in dev environment i am able to fetch the component name but in prod environment i don't get the component name, what i understand is that it gets minified and i get…
4
votes
1 answer

"DevTools failed to parse SourceMap: webpack://" and monorepo lerna packages sourcemap rewriting

Chrome is giving this warnings such as this in the console for many of the files that are in a similar position, this is just one such example: DevTools failed to parse SourceMap: webpack:///core/dist/utilities/utils.js.map Which is our code, but…
Jason Kleban
  • 20,024
  • 18
  • 75
  • 125
4
votes
1 answer

Keep functions and classes names on optimized build with Angular 8 (for reflexion purposes)

I'm trying to configure my Angular 8 project build to keep functions and classes names (I need my classes names to use reflexion and other class name based stuff). To manage this, I use @angular-builders/custom-webpack which allows to override…
Ben
  • 3,972
  • 8
  • 43
  • 82
4
votes
1 answer

Django compressor does not uglify javascript

I wish to use Django Compressor to both minify and uglify my css and javascript. I have got it working such that I do an offline compression and all required javascript is compressed correctly. The problem is that it does not uglify the code. My…
darkpool
  • 13,822
  • 16
  • 54
  • 89
4
votes
2 answers

terser not minifying function names

So I'm using terser with gulp and have tried several combinations but nothing seems to minify the function names here is an example: function minify() { return gulp.src('js/**/*.js') .pipe(gTerser({ keep_fnames: false, …
CommonSenseCode
  • 23,522
  • 33
  • 131
  • 186
3
votes
1 answer

How to resolve "Parcel build failed. @parcel/optimizer-terser: "_" is redeclared" error

Good day everyone! When I tried to build my parcel-based app, I encountered the following error: Build failed. @parcel/optimizer-terser: "_" is redeclared 3724 | > 3725 | let _ = (t1)=>t1 > | ^ "\_" is redeclared 3726 | , t; …
3
votes
1 answer

Webpack @azure/storage-blob node-fetch AbortSignal issue

I am facing one particular issue often talked about at various places the link I will share later. The problem is related to the webpack bundling. My nodeJS application uses @azure/storage-blob library to fetch the data while it works perfectly fine…
Sudhir
  • 766
  • 8
  • 17
3
votes
1 answer

Keep some comments in Webpack 5 production javascript output

I think I'm going insane, because every search engine throws me only results on how to remove the comments from output file and that's completely opposite of what I searched for I use all defaults from Webpack 5, where Terser is built-in, so…
Sharak
  • 888
  • 8
  • 17
3
votes
1 answer

Terser: prefix all mangled variables and functions

I'm working on a single-file script that is meant to be included on pages through a