@plaudit/webpack-extensions 2.20.0 → 2.20.1

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.
@@ -218,7 +218,10 @@ function processIndividualWebpackConfig(config, webpackConfig, sources) {
218
218
  : src.split(',')).filter(s => s.endsWith(".json") || !s.substring(s.lastIndexOf('/')).includes('.') || processingModules === scriptWithModuleExtension.test(s));
219
219
  const destPath = typeof dest === 'string' ? dest : dest.destination;
220
220
  const srcRoot = srcRoots.length === 1 ? joinPossiblyAbsolutePaths(process.cwd(), src) : srcRoots.map(s => joinPossiblyAbsolutePaths(process.cwd(), s));
221
- const srcIsDirectory = !Array.isArray(srcRoot) && node_fs_1.default.lstatSync(srcRoot).isDirectory();
221
+ const srcIsDirectory = !Array.isArray(srcRoot) && node_fs_1.default.lstatSync(srcRoot, { throwIfNoEntry: false })?.isDirectory();
222
+ if (srcIsDirectory === undefined) {
223
+ return undefined;
224
+ }
222
225
  const copyFiles = srcIsDirectory && src !== dest;
223
226
  const plugins = webpackConfig.plugins?.filter(isTruthy) ?? [];
224
227
  if (process.env["NO_TS_CHECKER"] !== "true") {
@@ -379,7 +382,7 @@ function processIndividualWebpackConfig(config, webpackConfig, sources) {
379
382
  return entry();
380
383
  }
381
384
  };
382
- });
385
+ }).filter((cfg) => cfg !== undefined);
383
386
  }
384
387
  module.exports = function (config, webpackConfig = require("@wordpress/scripts/config/webpack.config")) {
385
388
  testForDuplicatedEntryPaths(config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaudit/webpack-extensions",
3
- "version": "2.20.0",
3
+ "version": "2.20.1",
4
4
  "scripts": {
5
5
  "prepublishOnly": "rm -rf build && mkdir build && tsc",
6
6
  "build": "tsc",