Questions tagged [uglifyjs-webpack-plugin]

Related to UglifyJS plugin for webpack

10 questions
2
votes
1 answer

Does uglify-js support es6 and above?

I am watching this video : https://www.youtube.com/watch?v=kHifDVw5t_w . And in this video it is mentioned that uglify-js does not support es6 and above version of js. But when I try to minify js code(Es6 and above) with the help of uglify-js, it is…
2
votes
0 answers

Uglify mangle keep_quoted but ONLY where quoted

I have a scenario where I want to expose certain properties to other API's on the page, but internally keep those property names mangled. Uglify's "keep_quoted" option seems like it should do what I want, but instead it prevents every instance of…
Jeff Boyes
  • 31
  • 5
2
votes
1 answer

webpack with ocLazyload fails to load both controller and template files

var templatePath = require('../templatePath'); var controllerPath = require('../ControllerPath'); $scope.loadNgModules = function(templatePath, controllerPath) { var files = []; if (templatePath) files.push({ type: 'html', path:…
1
vote
2 answers

Could not resolve dependency: npm ERR! peer webpack@"^4.0.0" from uglifyjs-webpack-plugin@2.2.0

Here is details of my error: My node version is 16.13.0 and npm is 8.12.1. PS D:\ShowCase> npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: uglifyjs-webpack-plugin@2.2.0 npm ERR! Found:…
1
vote
2 answers

How to minify a source file (Javascript) into a minify file using uglifyjs-webpack

I want to minify my files using uglifyjs-webpack. For example I have a source file core/js/test and want to minify it and send it to min/js/test. Just using a source and respective output, how do I use it with webpack.
Sri
  • 63
  • 2
  • 10
1
vote
2 answers

Angular 6 universal, .net template , unable to publish due to uglifyjs-webpack-plugin

I'm using Angular 6 universal with .net template and unable to publish the site. I'm getting the following error: C:\Program Files\dotnet\sdk\2.1.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(140,5): error MSB3030: Could not…
shiva
  • 714
  • 10
  • 25
0
votes
1 answer

Use uglifyjs-webpack-plugin in `plugins` or in `minimizer` section of Webpack config?

When using the uglifyjs-webpack-plugin in your Webpack config files, should the plugin be used in the plugin section (based on this article) as showed in the first webpack config below? Or in the minimizer section, as shown in the second webpack…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
0
votes
0 answers

Webpack config for website

I have been using this webpack config for my project. I would like to have all the files in the "src" directory to be processed and placed in the directory "www". I.e.: src/*.css -> csso -> www/*.css src/*.html -> inline-css -> html-minify ->…
A. Petrov
  • 902
  • 1
  • 6
  • 6
0
votes
1 answer

Angularjs $filter not working with uglify

I am using webpack + uglifyjs-webpack-plugin + ng-annotate-webpack-plugin in an angularjs app when doing a build everything seems to be working fine until I hit a piece of code that it is using $filter("currency") or $filter("date"). and the console…
0
votes
1 answer

Disable webpack function mangling on specific files

I'm using webpack to bundle my angular app. One of the bundled files includes all the models required by the app, the models are defined using constructor functions. Webpack, through it's UglifyJS plugin, mangles my constructor function names which…
Niro
  • 314
  • 1
  • 4
  • 25