遵循本指南:https ://stackoverflow.com/a/73465262/13176156
我嘗試了答案中給出的兩個選項,但它們都不起作用。我安裝了@expo\webpack-config 并在 webpack-config.js 檔案中實作了更改,如下所示。
首先,將 output.hashFunction 更改為使用 'xxhash64',抱怨缺少摘要方法。
錯誤:不支持摘要方法
設定 Experiments.futureDefaults = true 給出了這個錯誤:
TypeError:無法設定未定義的屬性(設定“futureDefaults”)
如果有人可以幫助我理解為什么它不起作用,以及是否可以做任何事情來使用備用散列演算法,那將不勝感激。
謝謝你。
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv);
// Customize the config before returning it.
config.output.hashFunction = 'xxhash64';
config.experiments.futureDefaults = true;
return config;
};
uj5u.com熱心網友回復:
xxhash-addon為您的 Node.js 運行時安裝。
其類的實作滿足Webpack 所需XXHash64的自定義介面要求(物件必須具有更新/摘要方法) 。hashFunction
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv);
// Customize the config before returning it.
config.output.hashFunction = require('xxhash-addon').XXHash64;
return config;
};
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/519675.html
