diff --git a/frontend/package.json b/frontend/package.json index b00c372a..da5bef64 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -98,5 +98,8 @@ "no-unused-vars": "warn" } }, - "prettier": {} + "prettier": {}, + "engines": { + "node": ">=16 <20" + } } diff --git a/frontend/webpack.config.js b/frontend/webpack.config.js index 1bb0ed09..56b854d8 100644 --- a/frontend/webpack.config.js +++ b/frontend/webpack.config.js @@ -58,8 +58,8 @@ const version = (() => { } try { - return fs.readFileSync("../version.txt", {encoding: "utf-8"}).trim(); - } catch(e) {} + return fs.readFileSync("../version.txt", { encoding: "utf-8" }).trim(); + } catch (e) {} return packageJSON.version; })(); @@ -70,6 +70,9 @@ module.exports = { path: path.resolve(__dirname, "dist"), filename: `js/[name]${isDevServer ? "" : ".[contenthash]"}.js`, publicPath: "/", + // Fix node >v16 compatibility issues + // https://stackoverflow.com/a/73465262 + hashFunction: "xxhash64", }, devtool: "inline-source-map",