Frontend Node version support (#382)
This commit is contained in:
parent
003b3c7a78
commit
3ad47a4c8c
@ -98,5 +98,8 @@
|
|||||||
"no-unused-vars": "warn"
|
"no-unused-vars": "warn"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"prettier": {}
|
"prettier": {},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16 <20"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,8 +58,8 @@ const version = (() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return fs.readFileSync("../version.txt", {encoding: "utf-8"}).trim();
|
return fs.readFileSync("../version.txt", { encoding: "utf-8" }).trim();
|
||||||
} catch(e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
return packageJSON.version;
|
return packageJSON.version;
|
||||||
})();
|
})();
|
||||||
@ -70,6 +70,9 @@ module.exports = {
|
|||||||
path: path.resolve(__dirname, "dist"),
|
path: path.resolve(__dirname, "dist"),
|
||||||
filename: `js/[name]${isDevServer ? "" : ".[contenthash]"}.js`,
|
filename: `js/[name]${isDevServer ? "" : ".[contenthash]"}.js`,
|
||||||
publicPath: "/",
|
publicPath: "/",
|
||||||
|
// Fix node >v16 compatibility issues
|
||||||
|
// https://stackoverflow.com/a/73465262
|
||||||
|
hashFunction: "xxhash64",
|
||||||
},
|
},
|
||||||
|
|
||||||
devtool: "inline-source-map",
|
devtool: "inline-source-map",
|
||||||
|
Loading…
Reference in New Issue
Block a user