Closed snshn closed 7 years ago
Indeed, compress
is required. It's how you pass your information to Meteor's uglifly.
@PEM-- Having the same issue, even with the standard settings:
"uglifyjs2": {
"deadCodes": [
"_meteor.Meteor.isServer",
"Meteor.isServer"
],
"fileRemoval": [
"packages/ddp-server.js",
"packages/shell-server.js",
"packages/ssrwpo_uglifyjs2.js"
],
"packageDebug": false,
"aggressive": true,
"options": {
"fromString": true,
"compress": {
"properties": true,
"dead_code": true,
"drop_debugger": true,
"conditionals": true,
"comparisons": true,
"evaluate": true,
"booleans": true,
"loops": true,
"unused": true,
"hoist_funs": true,
"if_return": true,
"join_vars": true,
"cascade": true,
"collapse_vars": true,
"negate_iife": true,
"pure_getters": true,
"drop_console": true,
"keep_fargs": false,
"keep_fnames": false,
"passes": 1,
"global_defs": {
"UGLYFYJS_DEAD": false
}
}
}
}
It happens after adding:
import socketio from 'socket.io-client';
Getting this fatal JS error in my app after compressing with
"compress": false
:Reference error: UGLYFYJS_DEAD is not defined
. I use'use strict';
in my app, so perhaps that's why it's happening.Using this config:
results in the same error, even though
UGLYFYJS_DEAD
is set in that case.