我正在嘗試使用solito來使用帶有 React Native 和 Next.js 的 monorepo。
我成功地創建了一個全新的專案。我的下一步是添加一個名為react-native-paper. 到目前為止在 React Native 上看起來不錯
我的問題:我需要設定一個自定義 webpack 配置/next.config.js來處理.ttf檔案,但我不知道如何 ??
這就是我所做的,但它陷入了無限回圈。
const withFonts = require('next-fonts')
module.exports = withPlugins(
[
withTM,
[
withFonts, <------ seams this custom config is not happy
{
enableSvg: true,
webpack(config, options) {
return config
},
},
],
[withExpo, { projectRoot: __dirname }],
],
nextConfig
)
uj5u.com熱心網友回復:
晚上我重新訪問了我的代碼并簡單地洗掉了webpack自定義配置并且它正在作業。
const withFonts = require('next-fonts')
module.exports = withPlugins(
[withTM, withFonts, [withExpo, { projectRoot: __dirname }]],
nextConfig
)
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/445954.html
