See the following section of the tutor-mfe README:
module.config.js is only for development. (And even then, it’ll only work if the git checkout of the package is inside the mounted directory.) For production, you must npm install the package to override.
You also have to make sure that the package you’re installing is compatible with the version the MFE expects.
To be honest, I’ve read the README for like 15 times and do all stuffs I could do. And yes, I want to make it work for development. Cuz, in production, It’s working
In that case, you have to make sure that the frontend-component-header and frontend-component-footer checkouts are inside the MFE’s own directory, otherwise module.config.js will not work. This is because the dev container can’t access directories that are outside the mounted one.
No, what I meant is that your frontend-component-header directory should be in the frontend-app-learning one. The result of something like:
git clone frontend-app-learning
cd frontend-app-learning
git clone frontend-component-header
vim modules.config.js
cd ../
tutor mounts add ./frontend-app-learning
tutor dev launch
Yes, in that if tutor-mfe stays the way it is it should definitely be documented. It’s a common enough development task to warrant it.
No, in that I don’t think this is great behavior. Ideally it should be possible to have module.config.js point to a sibling directory.
And while I’ve figured out this workaround, I don’t much like it. So I hesitated in submitting a docs PR in favor of later finding time to write a PR to obviate the need for a workaround instead. It’s just that I haven’t found that time, yet.