weboptimizer 4.0.47 → 4.0.48

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weboptimizer",
3
- "version": "4.0.47",
3
+ "version": "4.0.48",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -94,7 +94,7 @@
94
94
  "babel-loader": "^10.1.1",
95
95
  "babel-plugin-polyfill-corejs3": "^1.0.0",
96
96
  "babel-plugin-transform-rewrite-imports": "^1.5.4",
97
- "clientnode": "4.0.1480",
97
+ "clientnode": "4.0.1481",
98
98
  "core-js": "^3.49.0",
99
99
  "ejs": "^6.0.1",
100
100
  "exports-loader": "^5.0.0",
@@ -790,7 +790,7 @@ if (configuration.path.configuration.json) try {
790
790
  const generatedBarrelModuleFilePaths = [];
791
791
  const barrelledModuleFilePaths = [];
792
792
  const normalizedEntryInjection = {};
793
- for (const [chunkName, moduleIDs] of Object.entries(configuration.injection.entry.normalized)) if (Array.isArray(moduleIDs) && moduleIDs.length > 1) {
793
+ for (const [chunkName, moduleIDs] of Object.entries(configuration.injection.entry.normalized)) if (configuration.givenCommandLineArguments[2] === 'test' && Array.isArray(moduleIDs) && moduleIDs.length > 1) {
794
794
  const barrelModuleFilePath = resolve(configuration.path.context, `.__${convertToValidVariableName(chunkName)}__.barrel.mjs`);
795
795
  await writeFile(barrelModuleFilePath, moduleIDs.map(moduleID => {
796
796
  const specifier = stripLoader(moduleID);
@@ -801,7 +801,7 @@ for (const [chunkName, moduleIDs] of Object.entries(configuration.injection.entr
801
801
  encoding: configuration.encoding
802
802
  });
803
803
  generatedBarrelModuleFilePaths.push(barrelModuleFilePath);
804
- normalizedEntryInjection[chunkName] = [`./${relative(configuration.path.context, barrelModuleFilePath)}`];
804
+ normalizedEntryInjection[chunkName] = [barrelModuleFilePath];
805
805
  } else normalizedEntryInjection[chunkName] = moduleIDs;
806
806
  if (generatedBarrelModuleFilePaths.length) pluginInstances.push({
807
807
  apply: compiler => {