Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 85362b1

Browse files
authored
Merge pull request #1265 from bjones1/node_17
Node 17
2 parents 1d63472 + 244a4e0 commit 85362b1

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

webpack.config.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
const path = require("path");
1010

11-
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
12-
const CopyPlugin = require('copy-webpack-plugin');
11+
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
12+
const CopyPlugin = require("copy-webpack-plugin");
1313
const CompressionPlugin = require("compression-webpack-plugin");
14-
const HtmlWebpackPlugin = require('html-webpack-plugin');
15-
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
14+
const HtmlWebpackPlugin = require("html-webpack-plugin");
15+
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
1616

1717
module.exports = (env, argv) => {
1818
const is_dev_mode = argv.mode === "development";
@@ -21,8 +21,8 @@ module.exports = (env, argv) => {
2121
// Cache build results between builds in development mode, per the `docs <https://webpack.js.org/configuration/cache/>`__.
2222
cache: is_dev_mode
2323
? {
24-
type: "filesystem",
25-
}
24+
type: "filesystem",
25+
}
2626
: false,
2727
entry: {
2828
runestone: "./webpack.index.js",
@@ -48,6 +48,7 @@ module.exports = (env, argv) => {
4848
crypto: false,
4949
fs: false,
5050
path: false,
51+
string_decoder: false,
5152
},
5253
},
5354
externals: {
@@ -58,6 +59,8 @@ module.exports = (env, argv) => {
5859
path: path.resolve(__dirname, "runestone/dist"),
5960
// See https://webpack.js.org/guides/caching/. This provides a hash for dynamic imports as well, avoiding caching out-of-date JS.
6061
filename: "[name].bundle.js?v=[contenthash]",
62+
// Node 17.0 reports ``Error: error:0308010C:digital envelope routines::unsupported``. Per `SO <https://stackoverflow.com/a/69394785/16038919>`_, this error is produced by using an old, default hash that OpenSSL removed support for. The `webpack docs <https://webpack.js.org/configuration/output/#outputhashfunction>"__ says that ``xxhash64`` is a faster algorithm.
63+
hashFunction: "xxhash64",
6164
// Delete everything in the output directory on each build.
6265
clean: true,
6366
},

0 commit comments

Comments
 (0)