使用create-expo-app修改webpack-config.js哈希函数报错求助
Expo Webpack配置哈希算法问题求助
我按照某Stack Overflow回答的两种方案修改Expo项目的webpack配置,但均未生效,已安装@expo/webpack-config,相关情况如下:
尝试的方案及对应报错
- 方案一:将
output.hashFunction改为'xxhash64',出现报错:
Error: Digest method not supported
- 方案二:设置
experiments.futureDefaults = true,出现报错:
TypeError: Cannot set properties of undefined (setting 'futureDefaults')
希望有人能帮忙分析问题原因,并告知是否有可用的替代哈希算法,非常感谢。
我的webpack-config.js代码:
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; };
内容的提问来源于stack exchange,提问作者dnamana
相关产品推荐
相关产品推荐

