Skip to content

Commit 13d64a3

Browse files
committed
added back babel-polyfill
1 parent aa00e5e commit 13d64a3

5 files changed

Lines changed: 10 additions & 6 deletions

File tree

.babelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"presets": ["es2015"],
3-
"plugins": ["transform-object-assign"]
3+
"plugins": [
4+
"transform-array-from",
5+
"transform-object-assign"
6+
]
47
}

index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@
22

33
import { JavaScriptObfuscator } from './src/JavaScriptObfuscator';
44

5-
if (!(<any>global)._babelPolyfill) {
6-
require('babel-polyfill');
7-
}
8-
95
module.exports = JavaScriptObfuscator;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"devDependencies": {
2929
"babel-cli": "^6.9.0",
3030
"babel-loader": "^6.2.4",
31+
"babel-plugin-transform-array-from": "^1.0.0",
3132
"babel-plugin-transform-object-assign": "^6.8.0",
3233
"babel-preset-es2015": "^6.9.0",
3334
"chai": "^3.5.0",

scripts/test-compile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
$(npm bin)/tsc -p tsconfig-test.json
4-
$(npm bin)/babel test-tmp --out-dir test-tmp --source-maps --presets es2015 --plugins transform-object-assign
4+
$(npm bin)/babel test-tmp --out-dir test-tmp --source-maps --presets es2015 --plugins transform-array-from,transform-object-assign

src/JavaScriptObfuscator.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import { JavaScriptObfuscatorCLI } from "./cli/JavaScriptObfuscatorCLI";
1212
import { Obfuscator } from "./Obfuscator";
1313
import { Options } from "./Options";
1414

15+
if (!(<any>global)._babelPolyfill) {
16+
require('babel-polyfill');
17+
}
18+
1519
export class JavaScriptObfuscator {
1620
/**
1721
* @type {GenerateOptions}

0 commit comments

Comments
 (0)