[英]lib folder is not present inside the '@module-federation/nextjs-mf?
Hi i am trying to make use of micro front end in nextjs, So as mentioned in this npm pkg link,嗨,我正在尝试在 nextjs 中使用微前端,因此如 npm pkg 链接中所述,
lib folder is not present inside the @module-federation package @module-federation package 中不存在 lib 文件夹
tried below way to import the include-defaults尝试通过以下方式导入 include-defaults
import '@module-federation/nextjs-mf/lib/include-defaults'
but it throws the below error但它抛出以下错误
Module not found: Can't resolve '@module-federation/nextjs-mf/lib/include-defaults'
import App, { AppContext as NextAppContext } from 'next/app'
import '@module-federation/nextjs-mf/lib/include-defaults'
We can find files inside the src folder, So we can point src like below我们可以在 src 文件夹中找到文件,所以我们可以像下面这样指向 src
import '@module-federation/nextjs-mf/src/include-defaults'
This will importing lib as expected,这将按预期导入 lib,
** Note but i am not sure, why the lib folder and its files are not there in the package ** 注意,但我不确定,为什么 package 中没有 lib 文件夹及其文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.