Skip to content

Commit 83703bc

Browse files
authored
[FIX] Use the target bundle format to decide decoration (#24)
- To judge whether a module should be decorated or not depends on the currently being used bundle format. Therefore the target bundle format should be used instead of checking whether the global module is inside the resolved modules
1 parent 4b74ec5 commit 83703bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/lbt/bundle/Builder.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ class BundleBuilder {
136136
// when decorateBootstrapModule is set to false, we don't write the optimized flag
137137
// and don't write the try catch wrapper
138138
this.shouldDecorate = this.options.decorateBootstrapModule &&
139-
(((this.optimizedSources && !this.options.debugMode) || this.optimize) && resolvedModule.containsGlobal);
139+
(((this.optimizedSources && !this.options.debugMode) || this.optimize) &&
140+
this.targetBundleFormat.shouldDecorate(resolvedModule));
140141
// TODO is the following condition ok or should the availability of jquery.sap.global.js be configurable?
141142
this.jqglobalAvailable = !resolvedModule.containsGlobal;
142143
this.openModule(resolvedModule.name);

0 commit comments

Comments
 (0)