lib folder is not present inside the '@module-federation/nextjs-mf?

444 views Asked by At

Hi i am trying to make use of micro front end in nextjs , So as mentioned in this npm pkg link ,

lib folder is not present inside the @module-federation package

tried below way to import the 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'
1

There are 1 answers

0
Gopinath Kaliappan On BEST ANSWER

We can find files inside the src folder, So we can point src like below

import '@module-federation/nextjs-mf/src/include-defaults'

This will importing lib as expected ,

** Note but i am not sure , why the lib folder and its files are not there in the package