fix: webpack config exclude statement to system agnostic (#6857)
This commit is contained in:
parent
083bcf802c
commit
e7983bc493
@ -2,8 +2,8 @@ const path = require("path");
|
|||||||
const webpack = require("webpack");
|
const webpack = require("webpack");
|
||||||
const autoprefixer = require("autoprefixer");
|
const autoprefixer = require("autoprefixer");
|
||||||
const { parseEnvVariables } = require("./env");
|
const { parseEnvVariables } = require("./env");
|
||||||
|
|
||||||
const outputDir = process.env.EXAMPLE === "true" ? "example/public" : "dist";
|
const outputDir = process.env.EXAMPLE === "true" ? "example/public" : "dist";
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: "development",
|
mode: "development",
|
||||||
devtool: false,
|
devtool: false,
|
||||||
@ -17,7 +17,6 @@ module.exports = {
|
|||||||
filename: "[name].js",
|
filename: "[name].js",
|
||||||
chunkFilename: "excalidraw-assets-dev/[name]-[contenthash].js",
|
chunkFilename: "excalidraw-assets-dev/[name]-[contenthash].js",
|
||||||
assetModuleFilename: "excalidraw-assets-dev/[name][ext]",
|
assetModuleFilename: "excalidraw-assets-dev/[name][ext]",
|
||||||
|
|
||||||
publicPath: "",
|
publicPath: "",
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -45,7 +44,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.(ts|tsx|js|jsx|mjs)$/,
|
test: /\.(ts|tsx|js|jsx|mjs)$/,
|
||||||
exclude:
|
exclude:
|
||||||
/node_modules\/(?!(browser-fs-access|canvas-roundrect-polyfill))/,
|
/node_modules[\\/](?!(browser-fs-access|canvas-roundrect-polyfill))/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: "import-meta-loader",
|
loader: "import-meta-loader",
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const webpack = require("webpack");
|
||||||
|
const autoprefixer = require("autoprefixer");
|
||||||
|
const { parseEnvVariables } = require("./env");
|
||||||
const TerserPlugin = require("terser-webpack-plugin");
|
const TerserPlugin = require("terser-webpack-plugin");
|
||||||
const BundleAnalyzerPlugin =
|
const BundleAnalyzerPlugin =
|
||||||
require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
||||||
const autoprefixer = require("autoprefixer");
|
|
||||||
const webpack = require("webpack");
|
|
||||||
const { parseEnvVariables } = require("./env");
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: "production",
|
mode: "production",
|
||||||
@ -47,8 +47,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.(ts|tsx|js|jsx|mjs)$/,
|
test: /\.(ts|tsx|js|jsx|mjs)$/,
|
||||||
exclude:
|
exclude:
|
||||||
/node_modules\/(?!(browser-fs-access|canvas-roundrect-polyfill))/,
|
/node_modules[\\/](?!(browser-fs-access|canvas-roundrect-polyfill))/,
|
||||||
|
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: "import-meta-loader",
|
loader: "import-meta-loader",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user