遵循本指南:https://stackoverflow.com/a/73465262/13176156
我尝试了答案中给出的两种选择,但它们都没有奏效。我安装了@expo\webpack-config,并在webpack-config.js文件中实现了这些更改,如下所示。
第一种方法是将output.hashFunction更改为使用‘xxhash64 64’,它抱怨缺少摘要方法。
错误:不支持摘要方法
设置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;
};
发布于 2022-10-19 12:40:02
为您的xxhash-addon
运行时安装Node.js。
它的XXHash64
类的实现满足Webpack所需的自定义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://stackoverflow.com/questions/74110029
复制相似问题