weboptimizer 4.0.13 → 4.0.14

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/ejsLoader.js CHANGED
@@ -39,6 +39,7 @@ export const log = new Logger({
39
39
  * @returns Transformed string.
40
40
  */
41
41
  export const loader = async function (source) {
42
+ console.log('AA', this.async, this.async());
42
43
  const callback = this.async();
43
44
  const givenOptions = convertSubstringInPlainObject(extend(true, {
44
45
  compiler: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weboptimizer",
3
- "version": "4.0.13",
3
+ "version": "4.0.14",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -564,7 +564,7 @@
564
564
  }
565
565
  ],
566
566
  "watchFiles": {
567
- "__evaluate__": "self.webpack.watchOptions ? {options: self.webpack.watchOptions} : {}"
567
+ "__evaluate__": "{paths: [], options: {cwd: self.path.target.base, ...(self.webpack.watchOptions ?? {})}}"
568
568
  }
569
569
  },
570
570
  "tool": false
@@ -586,7 +586,9 @@
586
586
  "globalObject": {
587
587
  "__evaluate__": "2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2] === 'serve' ? 'window' : 'this'"
588
588
  },
589
- "self": "modern-module"
589
+ "self": {
590
+ "__evaluate__": "2 < self.givenCommandLineArguments.length && ['document', 'serve'].includes(self.givenCommandLineArguments[2]) ? 'var' : 'modern-module'"
591
+ }
590
592
  },
591
593
  "extensions": {
592
594
  "file": {
@@ -1651,9 +1653,6 @@
1651
1653
  ]
1652
1654
  }
1653
1655
  },
1654
- "exportFormat": {
1655
- "self": "var"
1656
- },
1657
1656
  "generic": {
1658
1657
  "isWeb": false
1659
1658
  },
@@ -76,7 +76,7 @@ export class HTMLTransformation {
76
76
  for (const loaderConfiguration of [].concat(htmlFileSpecification.template.use)) if (loaderConfiguration.options?.compileSteps && typeof loaderConfiguration.options.compileSteps === 'number') data.html = await new Promise((resolve, reject) => {
77
77
  void ejsLoader.bind({
78
78
  query: extend(true, Object.prototype.hasOwnProperty.call(loaderConfiguration, 'options') ? copy(loaderConfiguration.options) : {}, htmlFileSpecification.template.postCompileOptions),
79
- async: (error, result) => {
79
+ async: () => (error, result) => {
80
80
  if (error) reject(error);else resolve(result);
81
81
  }
82
82
  })(data.html);