From 4b6ad2fa867f3ca0ecb60872d297e62153fb2fad Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Wed, 19 Mar 2025 13:27:02 +0100 Subject: [PATCH] Stop using stupid __dirname --- webpack.config.ts | 4 ++++ webpack.dev.config.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/webpack.config.ts b/webpack.config.ts index 1ee2c25..1532f6d 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -2,6 +2,10 @@ import path from 'path'; import webpack from 'webpack'; +import { fileURLToPath } from "url"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); const config: webpack.Configuration = { entry: "./src/mushroom-strategy.ts", diff --git a/webpack.dev.config.ts b/webpack.dev.config.ts index 3a00697..4e397bb 100644 --- a/webpack.dev.config.ts +++ b/webpack.dev.config.ts @@ -2,6 +2,10 @@ import path from 'path'; import webpack from 'webpack'; +import { fileURLToPath } from "url"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); const config: webpack.Configuration = { entry: "./src/mushroom-strategy.ts",