From e7983bc493ee1cb4604b9665443de56e7a73d029 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Sat, 5 Aug 2023 11:49:57 +0200 Subject: [PATCH] fix: webpack config exclude statement to system agnostic (#6857) --- src/packages/excalidraw/webpack.dev.config.js | 5 ++--- src/packages/excalidraw/webpack.prod.config.js | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/packages/excalidraw/webpack.dev.config.js b/src/packages/excalidraw/webpack.dev.config.js index 28130738..332d8028 100644 --- a/src/packages/excalidraw/webpack.dev.config.js +++ b/src/packages/excalidraw/webpack.dev.config.js @@ -2,8 +2,8 @@ const path = require("path"); const webpack = require("webpack"); const autoprefixer = require("autoprefixer"); const { parseEnvVariables } = require("./env"); - const outputDir = process.env.EXAMPLE === "true" ? "example/public" : "dist"; + module.exports = { mode: "development", devtool: false, @@ -17,7 +17,6 @@ module.exports = { filename: "[name].js", chunkFilename: "excalidraw-assets-dev/[name]-[contenthash].js", assetModuleFilename: "excalidraw-assets-dev/[name][ext]", - publicPath: "", }, resolve: { @@ -45,7 +44,7 @@ module.exports = { { test: /\.(ts|tsx|js|jsx|mjs)$/, exclude: - /node_modules\/(?!(browser-fs-access|canvas-roundrect-polyfill))/, + /node_modules[\\/](?!(browser-fs-access|canvas-roundrect-polyfill))/, use: [ { loader: "import-meta-loader", diff --git a/src/packages/excalidraw/webpack.prod.config.js b/src/packages/excalidraw/webpack.prod.config.js index c9f8d56a..8f8c72ee 100644 --- a/src/packages/excalidraw/webpack.prod.config.js +++ b/src/packages/excalidraw/webpack.prod.config.js @@ -1,10 +1,10 @@ const path = require("path"); +const webpack = require("webpack"); +const autoprefixer = require("autoprefixer"); +const { parseEnvVariables } = require("./env"); const TerserPlugin = require("terser-webpack-plugin"); const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin; -const autoprefixer = require("autoprefixer"); -const webpack = require("webpack"); -const { parseEnvVariables } = require("./env"); module.exports = { mode: "production", @@ -47,8 +47,7 @@ module.exports = { { test: /\.(ts|tsx|js|jsx|mjs)$/, exclude: - /node_modules\/(?!(browser-fs-access|canvas-roundrect-polyfill))/, - + /node_modules[\\/](?!(browser-fs-access|canvas-roundrect-polyfill))/, use: [ { loader: "import-meta-loader",