uglifyjs

Webpack Uglify errors in CSS

亡梦爱人 提交于 2019-12-23 07:34:42
问题 Im stressed trying to make Uglify working with my project, previously I have used Uglify and was not giving problems but now I think that is SASS related. ERROR in ./~/css-loader!./~/sass-loader!./app/scss/global-header.scss Module build failed: TypeError: Cannot read property '4' of undefined at reduce (/Users/contractor/centralefcom-global-components/node_modules/postcss-reduce-transforms/dist/index.js:121:23) at walk (/Users/contractor/centralefcom-global-components/node_modules/postcss

Webpack Uglify errors in CSS

﹥>﹥吖頭↗ 提交于 2019-12-23 07:34:06
问题 Im stressed trying to make Uglify working with my project, previously I have used Uglify and was not giving problems but now I think that is SASS related. ERROR in ./~/css-loader!./~/sass-loader!./app/scss/global-header.scss Module build failed: TypeError: Cannot read property '4' of undefined at reduce (/Users/contractor/centralefcom-global-components/node_modules/postcss-reduce-transforms/dist/index.js:121:23) at walk (/Users/contractor/centralefcom-global-components/node_modules/postcss

ERROR in renderer.js from UglifyJs Unexpected token punc «(»

吃可爱长大的小学妹 提交于 2019-12-23 00:48:10
问题 Version: webpack 2.3.3 Hi there I'm trying to build my first Electron app using Vuejs. Everything seems to be going great until I've come to package the app. When I run npm run dev everything works just fine. However, when I run npm build:darwin I get the following error ERROR in renderer.js from UglifyJs Unexpected token punc «(», expected punc «:» [renderer.js:26813,14] It does end up compiling however when I run the application I get the white screen of death. From what I read, this can be

Rails asset pipeline and javascript files - maintaining line breaks to aid debugging

冷暖自知 提交于 2019-12-21 17:31:55
问题 I recently migrated from Jammit to the Rails Asset Pipeline. Other than a few teething issues, everything has been working well. However, I recently started getting some script errors in production, and realised that it's near on impossible for me to debug them. I had previously configured Jammit to retain linebreaks, but otherwise remove all white space in the javascript files. This was to ensure that should I see a runtime error, I would be able to locate the offending line and hopefully

Webpack + UglifyJs: how to ignore warnings about 3rd party library code

孤者浪人 提交于 2019-12-21 09:24:38
问题 Using Webpack, I get a load of warnings from UglifyJSPlugin for all my 3rd party code. Is it possible to turn off warnings for some libraries only? 回答1: No, it's currently only possible to turn off all warnings, per the UglifyJS compressor options: https://github.com/mishoo/UglifyJS2#compressor-options You can turn off all warnings by passing UglifyJS options to the constructor for Webpack's UglifyJsPlugin: https://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin In your webpack

How to uglify output with Browserify in Gulp?

妖精的绣舞 提交于 2019-12-20 08:18:32
问题 I tried to uglify output of Browserify in Gulp, but it doesn't work. gulpfile.js var browserify = require('browserify'); var gulp = require('gulp'); var uglify = require('gulp-uglify'); var source = require('vinyl-source-stream'); gulp.task('browserify', function() { return browserify('./source/scripts/app.js') .bundle() .pipe(source('bundle.js')) .pipe(uglify()) // ??? .pipe(gulp.dest('./build/scripts')); }); As I understand I cannot make it in steps as below. Do I need to make in one pipe

How to uglify output with Browserify in Gulp?

感情迁移 提交于 2019-12-20 08:18:10
问题 I tried to uglify output of Browserify in Gulp, but it doesn't work. gulpfile.js var browserify = require('browserify'); var gulp = require('gulp'); var uglify = require('gulp-uglify'); var source = require('vinyl-source-stream'); gulp.task('browserify', function() { return browserify('./source/scripts/app.js') .bundle() .pipe(source('bundle.js')) .pipe(uglify()) // ??? .pipe(gulp.dest('./build/scripts')); }); As I understand I cannot make it in steps as below. Do I need to make in one pipe

How many globals make sense to be passed to the IIFE wrapper?

痞子三分冷 提交于 2019-12-20 03:52:37
问题 To which extent does it make sense to pass plenty of global values to an IIFE? The common thing is just to pass 3 as far as I see everywhere (window, document and undefined). But... would it make sense to pass more if they are used more than 10 times in the code just for the fact of minification? In my case I found the global variable Math 14 times in the code. It would make sense to pass it to an IIFE in order to save 42 bytes. Which in this case is not a lot, but if we sum bit by bit

Rails 3.1 Possible Bug in Asset Pipeline and Uglifier

谁说我不能喝 提交于 2019-12-19 22:16:23
问题 I ran into a problem deploying on Heroku do to a failure in the rake task rake assets:precompile At the bottom is the error I get if I integrate Rails 3.1 Jquery calendar: https://github.com/themouette/jquery-week-calendar Twitter bootstrap The error happens from uglifier. I suspect that problem could be related to the inclusion of many localizations for the calendar. I worked around the error by setting: # Compress JavaScripts and CSS config.assets.compress = false I was not able to examine

How to specify multiple source-maps in uglify grunt task?

喜你入骨 提交于 2019-12-18 05:46:06
问题 I am using grunt-contrib-uglify plugin in my grunt 0.4 . I have the following task: uglify: { dist: { options: { sourceMap: 'dist/sm/sm.js' }, files: grunt.file.expandMapping(['*.js'], 'dist/js', { cwd: 'dist/js' }) } }, As you can see, uglify is configured to compress multiple files, and there is only one source-map specified. (I am not able to figure out a way to specify multiple sourcemap outputs). Also, uglify is overwriting the soucemap after compressing each js file. How do I configure