Skip to content

Commit 5086fda

Browse files
committed
fix for older node.js
1 parent f939d03 commit 5086fda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

webpack.config.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import _ from "lodash";
44
// @ts-expect-error
55
import { CheckEsVersionPlugin } from "@bitjourney/check-es-version-webpack-plugin";
66

7+
const dirname = typeof __dirname === "undefined" ? import.meta.dirname : __dirname;
8+
79
const config = {
810
mode: "production",
911

1012
entry: "./src/index.ts",
1113
target: ["web", "es5"],
1214
output: {
13-
path: path.resolve(import.meta.dirname, "dist.es5+umd"),
15+
path: path.resolve(dirname, "dist.es5+umd"),
1416
library: "MessagePack",
1517
libraryTarget: "umd",
1618
globalObject: "this",

0 commit comments

Comments
 (0)