uglifyjs2 Questions

8

Solved

I am authoring a JavaScript library that I want to put on npm. I am currently using that library in another project and I have added it as a dependency using its GitHub repository: "dependenci...
Luthern asked 14/8, 2017 at 9:37

10

Solved

Hello I'm using uglifyJs to minify my javascript files, it's working well with one file at a time, what I'm loking for is to minify all the javascript files present in a folder called JS into a fol...
Usual asked 9/6, 2013 at 9:58

8

Solved

A small project I started make use a node module (installed via npm) that declares const variables. Running and testing this project is well, but browserify fails when UglifyJS is executed. Unex...
Decimate asked 22/11, 2017 at 16:1

2

Solved

I used to have problems with UglifyJS for Webpack and ES6 modules: ERROR in static/js/vendor.6ccd9e38979a78765c7a.js from UglifyJs Unexpected token: name (features) [./node_modules/pica/lib/ma...
Glowworm asked 24/10, 2017 at 2:51

1

Solved

In this project i am using gulp-uglify version 3.0.1 and i want to preserve comments containing license texts in the output. On the projects page it is stated that Most of the minify options from...
Gladiolus asked 19/12, 2018 at 14:34

1

Is there a way to call the UglifyJS2 API in a node script (ie by calling require('uglify-js').minify) on a string of code such that it removes dead/unreachable code but does not apply any compressi...
Lai asked 18/12, 2015 at 17:50

2

Solved

The default behaviour looks for @license or @preserve... But many plugins and libraries are still using /*! for licensing comment blocks... How can I use UglifyJS2 to preserve comments starting ...
Levigate asked 10/8, 2014 at 19:42

2

Solved

Webpack's removes classnames when minifying/uglifying ES6 code with inheritance: There's MVCE code which we try to minify/uglify: Class Child: const ParentClass = require('parent'); class Child...
Torto asked 1/4, 2018 at 12:54

2

Solved

I want to tree shake lodash as well as my unused multiply function from the generated bundle from webpack I have 2 main files app.js & math.js It contains the following code - app.js import...
Virginia asked 15/2, 2018 at 21:37

2

Solved

Is there a way to tell UglifyJS to skip a particular section of code, perhaps using comments like this: // uglifyjs:skipStart filter = function(item){ /* some crazy filter logic that will repeat 5...
Pyromagnetic asked 9/1, 2014 at 20:24

5

Solved

I'm using uglify-js to minify the source code. I want to remove the console.log statements of the original source code. Is it possible? Or is there any other compressor tool supports this? I use t...
Pseudocarp asked 20/11, 2013 at 9:50

4

I need to obfuscate my source code as best as possible so I decided to use uglifyjs2.. Now I have the project structure that has nested directories, how can I run it through uglifyjs2 to do the who...
Fortenberry asked 27/9, 2013 at 15:39

5

I use UglifyJS to minify a concatenated set of files, which works fine but not good enough. The built lib uses namespaces, so classes, functions and constants are stored in a root namespace variabl...
Roderickroderigo asked 2/5, 2013 at 9:47

1

Solved

According to the docs, UglifyJS can mangle all property names except those on a provided reserved list. Is it possible to do it the other way, so only properties on provided list will be mangled? ...
Transfiguration asked 15/6, 2015 at 8:47

2

Solved

I 'd like to parse some JavasScript code to list all methods for a given "class" using uglify js 2. In my case the TreeWalker returns a node with name : null and there is no information that allow ...
Kweiyang asked 7/4, 2015 at 9:39

3

I want to log javascript errors to server but the stacktrace is not useful with minified JS code. So I was thinking of using either Getsentry or Rollbar which shows proper stack trace with the help...
Yeorgi asked 24/2, 2014 at 15:41

2

Solved

I tried to uglify a simple javascript file using UglifyJS2. Here are the contents of the file : //this is simply a sample var var sampleVar = "xyz"; //lots of comments //this is just another com...
Moldau asked 18/12, 2013 at 8:59

1

Solved

I need to run several UglifyJS2 scripts with Node. I've added the command I want to run to a bat file and it runs OK. When I add a second command, like "cd ..", the command isn't executed! Very co...
Olva asked 4/6, 2014 at 18:32

2

Solved

I have a working requirejs project that is using grunt for building and deployment. If using no optimization at all, the build is working without problems and I get one big js file to deploy it on ...
Mettlesome asked 13/5, 2013 at 12:36

1

Solved

Does the pound sign (#) start a comment in JavaScript? I have a website I am using with NPM and when I tried to minify the JavaScript with Grunt, Uglify threw the error: Warning: Uglification fail...
Swanhilda asked 10/1, 2014 at 5:40

1

Solved

Do you know of a workflow that includes source maps for an app compiled with grunt? I am well aware of plugins like uglifyjs that allow you to simply generate a source map. But I'm looking for inc...
Hamelin asked 1/11, 2013 at 2:11

1

Solved

We're using requirejs.optimize(config) with uglify2 in our build scripts to minify our production JavaScript code. We want to limit the minified line length to about 80 chars, so that it will be ea...
Zoochore asked 19/11, 2013 at 22:44

1

Anyway to run UglifyJS2 without node.js? Say I would like to run it in a JVM process using JavaScript script engine. How to do that?
Nares asked 8/2, 2013 at 1:58
1

© 2022 - 2024 — McMap. All rights reserved.