pve-eslint/patches/0001-adapt-webpack-config.patch
Dominik Csapak 7579a6928f adapt webkpack patch for 8.23.1
we have to remove the (unnecessary) polyfill plugin, because some
transitive dependency (nodelib/fs.scandir) tries to access node specific
information that is stripped with these (browser targeting) polyfills

it's not necessary as we're targeting node anyway

also update the patch message to reflect the actual changes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-09-15 11:33:56 +02:00

42 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Thu, 2 Apr 2020 07:10:18 +0000
Subject: [PATCH] adapt webpack config
adds 'index.js' to build (so we can package it as a module)
and target 'node' since we will use it on the cli
removes the polyfill plugin (makes currently problems and we want to package
for node anyway)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
webpack.config.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,11 +1,11 @@
"use strict";
-const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
/** @type {import("webpack").Configuration} */
module.exports = {
mode: "none",
+ target: "node",
entry: {
- eslint: ["core-js/stable", "regenerator-runtime/runtime", "./lib/linter/linter.js"]
+ eslint: ["core-js/stable", "regenerator-runtime/runtime", "./lib/linter/linter.js", "./lib/eslint/index.js"]
},
output: {
filename: "[name].js",
@@ -43,9 +43,6 @@
}
]
},
- plugins: [
- new NodePolyfillPlugin()
- ],
resolve: {
mainFields: ["browser", "main", "module"]
},