diff --git a/package.json b/package.json index bcac1a4..e4fcee5 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ }, "dependencies": { "@babel/core": "^7.4.0", + "@babel/plugin-transform-block-scoping": "^7.4.0", "@types/astring": "^1.3.0", "@types/file-type": "^10.9.1", "@types/iltorb": "^2.3.0", diff --git a/src/constant/constant.ts b/src/constant/constant.ts index 970e77c..8007daa 100644 --- a/src/constant/constant.ts +++ b/src/constant/constant.ts @@ -37,7 +37,7 @@ export const constant: IConstant = { }, features: [], version: environment.NPM_PACKAGE_DEPENDENCIES_SYSTEMJS, - dependencies: ["es.promise", "fetch"], + dependencies: ["es.object.create", "es.object.freeze", "es.object.define-property", "es.promise", "fetch"], contexts: ALL_CONTEXTS }, zone: { diff --git a/src/service/minify/minify-service.ts b/src/service/minify/minify-service.ts index b78fb5c..fcb1319 100644 --- a/src/service/minify/minify-service.ts +++ b/src/service/minify/minify-service.ts @@ -25,7 +25,7 @@ export class MinifyService implements IMinifyService { sourceMaps: false, root: "", presets: [], - plugins: [] + plugins: ["@babel/plugin-transform-block-scoping"] }); return result.code; } diff --git a/test/server/server.test.ts b/test/server/server.test.ts index b6716a2..51cd274 100644 --- a/test/server/server.test.ts +++ b/test/server/server.test.ts @@ -61,7 +61,7 @@ test("Will not generate polyfills for 'Element' on Chrome 69 for a Galaxy S5", a t.true(result.statusCode === constants.HTTP_STATUS_OK); }); -test.only("Will generate correct polyfills for IE11", async t => { +test("Will generate correct polyfills for IE11", async t => { const result = await sendRequest({ http2: config.http2, tls: true, @@ -71,7 +71,7 @@ test.only("Will generate correct polyfills for IE11", async t => { port: config.port, path: `${ constant.endpoint.polyfill - }?features=web-components,es,class-list,system|variant=system,custom-event,url,fetch,object-fit,intersection-observer,animation,regenerator-runtime,requestanimationframe,requestidlecallback,resize-observer,pointer-event,dom.collections.iterable,scroll-behavior,zone|error|rxjs|shadydom,esnext.reflect,intl|force|locale=en~da`, + }?features=web-components,es,class-list,systemjs|variant=system,custom-event,url,fetch,object-fit,intersection-observer,animation,regenerator-runtime,requestanimationframe,requestidlecallback,resize-observer,pointer-event,dom.collections.iterable,scroll-behavior,zone|error|rxjs|shadydom,esnext.reflect,intl|force|locale=en~da`, acceptEncoding: undefined });