-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
Summary
I get a TypeError when Jquery minified version is included in the source files yet I do see any errors without obfuscation.
Expected Behavior
No console errors are expected after obfuscation.
Current Behavior
This is the console log in Chrome
jquery-3.4.1.min.js:2 Uncaught TypeError: Object.defineProperty called on non-object
at Function.defineProperty (<anonymous>)
at SE.cache (jquery-3.4.1.min.js:2)
at SE.get (jquery-3.4.1.min.js:2)
at Object.add (jquery-3.4.1.min.js:2)
at Number.<anonymous> (jquery-3.4.1.min.js:2)
at Function.each (jquery-3.4.1.min.js:2)
at Sm.fn.init.each (jquery-3.4.1.min.js:2)
at GB (jquery-3.4.1.min.js:2)
at Sm.fn.init.on (jquery-3.4.1.min.js:2)
A similar error is shown in firefox
Uncaught TypeError: Object.defineProperty called on non-object
Steps to Reproduce
- Upgrade to latest gulp-javascript-obfuscator
- Enable sourcemaps using 'gulp-sourcemaps'
- Add jquery-x.x.x.min.js to the src files
Environment
- Package version used: v1.1.6
- Node version used: v14.4.0
Minimal working example that will help to reproduce issue
const sourcemaps = require('gulp-sourcemaps');
const javascriptObfuscator = require('gulp-javascript-obfuscator');
gulp.src('jquery-3.4.1.min.js') //Also tried with Jquery-3.5.1
.pipe(sourcemaps.init())
.pipe(concat('build.min.js'))
.pipe(javascriptObfuscator({
compact: true
}))
.pipe(sourcemaps.write())
.pipe(gulp.dest('dist'));
Metadata
Metadata
Assignees
Labels
No labels