diff --git a/test/form/computed-properties/_expected/iife.js b/test/form/computed-properties/_expected/iife.js index 35b80af..963508a 100644 --- a/test/form/computed-properties/_expected/iife.js +++ b/test/form/computed-properties/_expected/iife.js @@ -7,4 +7,4 @@ exports.x = x; -}((this.computedProperties = {}))); \ No newline at end of file +}((this.computedProperties = this.computedProperties || {}))); diff --git a/test/form/computed-properties/_expected/umd.js b/test/form/computed-properties/_expected/umd.js index 5f7d146..1414460 100644 --- a/test/form/computed-properties/_expected/umd.js +++ b/test/form/computed-properties/_expected/umd.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.computedProperties = {}))); + (factory((global.computedProperties = global.computedProperties || {}))); }(this, function (exports) { 'use strict'; var foo = 'foo'; @@ -10,4 +10,4 @@ exports.x = x; -})); \ No newline at end of file +})); diff --git a/test/form/dedupes-external-imports/_expected/iife.js b/test/form/dedupes-external-imports/_expected/iife.js index 17ed0b7..57e6649 100644 --- a/test/form/dedupes-external-imports/_expected/iife.js +++ b/test/form/dedupes-external-imports/_expected/iife.js @@ -30,4 +30,4 @@ exports.bar = bar; exports.baz = baz; -}((this.myBundle = {}),external)); +}((this.myBundle = this.myBundle || {}),external)); diff --git a/test/form/dedupes-external-imports/_expected/umd.js b/test/form/dedupes-external-imports/_expected/umd.js index 70bc301..e33aca8 100644 --- a/test/form/dedupes-external-imports/_expected/umd.js +++ b/test/form/dedupes-external-imports/_expected/umd.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('external')) : typeof define === 'function' && define.amd ? define(['exports', 'external'], factory) : - (factory((global.myBundle = {}),global.external)); + (factory((global.myBundle = global.myBundle || {}),global.external)); }(this, function (exports,external) { 'use strict'; class Foo extends external.Component { @@ -33,4 +33,4 @@ exports.bar = bar; exports.baz = baz; -})); \ No newline at end of file +})); diff --git a/test/form/export-all-from-internal/_expected/iife.js b/test/form/export-all-from-internal/_expected/iife.js index b5dad56..8a3cd17 100644 --- a/test/form/export-all-from-internal/_expected/iife.js +++ b/test/form/export-all-from-internal/_expected/iife.js @@ -7,4 +7,4 @@ exports.a = a; exports.b = b; -}((this.exposedInternals = {}))); +}((this.exposedInternals = this.exposedInternals || {}))); diff --git a/test/form/export-all-from-internal/_expected/umd.js b/test/form/export-all-from-internal/_expected/umd.js index 74613b4..c1bf8a9 100644 --- a/test/form/export-all-from-internal/_expected/umd.js +++ b/test/form/export-all-from-internal/_expected/umd.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.exposedInternals = {}))); + (factory((global.exposedInternals = global.exposedInternals || {}))); }(this, function (exports) { 'use strict'; const a = 1; @@ -10,4 +10,4 @@ exports.a = a; exports.b = b; -})); \ No newline at end of file +})); diff --git a/test/form/exports-at-end-if-possible/_expected/iife.js b/test/form/exports-at-end-if-possible/_expected/iife.js index a0ce6a9..1c5c67b 100644 --- a/test/form/exports-at-end-if-possible/_expected/iife.js +++ b/test/form/exports-at-end-if-possible/_expected/iife.js @@ -9,4 +9,4 @@ exports.FOO = FOO; -}((this.myBundle = {}))); +}((this.myBundle = this.myBundle || {}))); diff --git a/test/form/exports-at-end-if-possible/_expected/umd.js b/test/form/exports-at-end-if-possible/_expected/umd.js index 20d0d2a..09b2ea6 100644 --- a/test/form/exports-at-end-if-possible/_expected/umd.js +++ b/test/form/exports-at-end-if-possible/_expected/umd.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.myBundle = {}))); + (factory((global.myBundle = global.myBundle || {}))); }(this, function (exports) { 'use strict'; var FOO = 'foo'; @@ -12,4 +12,4 @@ exports.FOO = FOO; -})); \ No newline at end of file +})); diff --git a/test/form/multiple-exports/_expected/iife.js b/test/form/multiple-exports/_expected/iife.js index 3a3975d..d2da90f 100644 --- a/test/form/multiple-exports/_expected/iife.js +++ b/test/form/multiple-exports/_expected/iife.js @@ -7,4 +7,4 @@ exports.foo = foo; exports.bar = bar; -}((this.myBundle = {}))); +}((this.myBundle = this.myBundle || {}))); diff --git a/test/form/multiple-exports/_expected/umd.js b/test/form/multiple-exports/_expected/umd.js index 485e381..32d762a 100644 --- a/test/form/multiple-exports/_expected/umd.js +++ b/test/form/multiple-exports/_expected/umd.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.myBundle = {}))); + (factory((global.myBundle = global.myBundle || {}))); }(this, function (exports) { 'use strict'; var foo = 1; @@ -10,4 +10,4 @@ exports.foo = foo; exports.bar = bar; -})); \ No newline at end of file +})); diff --git a/test/form/namespaced-named-exports/_expected/iife.js b/test/form/namespaced-named-exports/_expected/iife.js index 2fc75df..69637e9 100644 --- a/test/form/namespaced-named-exports/_expected/iife.js +++ b/test/form/namespaced-named-exports/_expected/iife.js @@ -7,4 +7,4 @@ this.foo.bar = this.foo.bar || {}; exports.answer = answer; -}((this.foo.bar.baz = {}))); +}((this.foo.bar.baz = this.foo.bar.baz || {}))); diff --git a/test/form/namespaced-named-exports/_expected/umd.js b/test/form/namespaced-named-exports/_expected/umd.js index aeb7775..3717913 100644 --- a/test/form/namespaced-named-exports/_expected/umd.js +++ b/test/form/namespaced-named-exports/_expected/umd.js @@ -1,11 +1,11 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.foo = global.foo || {}, global.foo.bar = global.foo.bar || {}, global.foo.bar.baz = {}))); + (factory((global.foo = global.foo || {}, global.foo.bar = global.foo.bar || {}, global.foo.bar.baz = global.foo.bar.baz || {}))); }(this, function (exports) { 'use strict'; var answer = 42; exports.answer = answer; -})); \ No newline at end of file +})); diff --git a/test/form/preserves-comments-after-imports/_expected/iife.js b/test/form/preserves-comments-after-imports/_expected/iife.js index e9338dc..ee4c000 100644 --- a/test/form/preserves-comments-after-imports/_expected/iife.js +++ b/test/form/preserves-comments-after-imports/_expected/iife.js @@ -9,4 +9,4 @@ exports.obj = obj; -}((this.myBundle = {}))); +}((this.myBundle = this.myBundle || {}))); diff --git a/test/form/preserves-comments-after-imports/_expected/umd.js b/test/form/preserves-comments-after-imports/_expected/umd.js index ac58856..4d34fef 100644 --- a/test/form/preserves-comments-after-imports/_expected/umd.js +++ b/test/form/preserves-comments-after-imports/_expected/umd.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.myBundle = {}))); + (factory((global.myBundle = global.myBundle || {}))); }(this, function (exports) { 'use strict'; /** A comment for a number */ @@ -12,4 +12,4 @@ exports.obj = obj; -})); \ No newline at end of file +}));