weboptimizer 4.0.14 → 4.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/webpackConfigurator.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weboptimizer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.15",
|
|
4
4
|
"description": "A generic web optimizer, (module) bundler and development environment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"@types/html-minifier": "^4.0.6",
|
|
124
124
|
"@types/html-minifier-terser": "^7.0.2",
|
|
125
125
|
"@types/imagemin": "^9.0.1",
|
|
126
|
-
"@types/node": "^26.1.
|
|
126
|
+
"@types/node": "^26.1.1",
|
|
127
127
|
"@types/postcss-import": "^14.0.3",
|
|
128
128
|
"@types/postcss-url": "^10.0.4",
|
|
129
129
|
"@types/webpack-env": "^1.18.8",
|
|
@@ -356,7 +356,7 @@
|
|
|
356
356
|
"__evaluate__": "self.debug"
|
|
357
357
|
},
|
|
358
358
|
"EXTERNAL_EXPORT_FORMAT": {
|
|
359
|
-
"__evaluate__": "`'${self.exportFormat.external}'`"
|
|
359
|
+
"__evaluate__": "`'${self.exportFormat.external ?? self.exportFormat.self}'`"
|
|
360
360
|
},
|
|
361
361
|
"NAME": {
|
|
362
362
|
"__evaluate__": "`'${self.name}'`"
|
|
@@ -587,7 +587,7 @@
|
|
|
587
587
|
"__evaluate__": "2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2] === 'serve' ? 'window' : 'this'"
|
|
588
588
|
},
|
|
589
589
|
"self": {
|
|
590
|
-
"__evaluate__": "2 < self.givenCommandLineArguments.length && ['document', 'serve'].includes(self.givenCommandLineArguments[2]) ? '
|
|
590
|
+
"__evaluate__": "2 < self.givenCommandLineArguments.length && ['document', 'serve'].includes(self.givenCommandLineArguments[2]) ? 'window' : 'modern-module'"
|
|
591
591
|
}
|
|
592
592
|
},
|
|
593
593
|
"extensions": {
|
package/webpackConfigurator.js
CHANGED
|
@@ -244,7 +244,9 @@ if (configuration.injection.external.modules === '__implicit__')
|
|
|
244
244
|
}
|
|
245
245
|
if (typeof result !== 'string' && Object.prototype.hasOwnProperty.call(result, 'root') && Array.isArray(result.root)) result.root = [].concat(result.root).map(name => convertToValidVariableName(name));
|
|
246
246
|
const exportFormat = Object.prototype.hasOwnProperty.call(configuration.exportFormat, 'external') ? configuration.exportFormat.external : configuration.exportFormat.self;
|
|
247
|
-
|
|
247
|
+
let reference = exportFormat === 'umd' || typeof result === 'string' ? result : result[exportFormat];
|
|
248
|
+
if (typeof reference === 'string' && ['window', 'var'].includes(exportFormat)) reference = convertToValidVariableName(reference);
|
|
249
|
+
callback(undefined, reference, exportFormat);
|
|
248
250
|
return;
|
|
249
251
|
}
|
|
250
252
|
callback();
|