I am producing a vendor from the node_modules umd file.
/node_modules/@material-ui/core/umd/material-ui.production.min.js
I'm doing the same in react.js
/node_modules/react/umd/react.production.min.js',
but I do not extract material-ui from the file size and show the umd reference. I could not find any documents and examples about it.
what I'm trying to do is:
Provide material-ui read from one place for microfrontend projects.
I am trying to extract this from their file size as well.



The UMD build is for prototyping only.
https://material-ui.com/getting-started/installation/#cdn
Can't remove the material-ui package without compiling and reference the cdn? I request in the compilation of my joint projects. They all have a material-ui package.
const externalForMaterialUi = (context, request, callback) => {
if (/@material-ui.+/.test(request)) {
const name = request.replace(/^.*[\\\/]/, '')
return callback(null, 'root MaterialUI.' + name);
}
callback();
}
I take out a package this way but it doesn't see the CDN reference.
I am also facing the same issue. When I try to exclude all material-ui packages from my micro-frontend bundle, It cannot load from CDN. Is thre any way to do this? Actually it's been a week I am trying to exclude material packages but non of the solutions I have found on the web worked for me.
The way I exclude material-ui packages is like this;
function externalForMaterialUi(context, request, callback) {
if (/@material-ui.+/.test(request)) {
const name = request.replace(/^.*[\\\/]/, '')
return callback(null, 'root MaterialUI.' + name);
}
callback();
}
The CDN reference is like this;
<script src="https://unpkg.com/@material-ui/[email protected]/umd/material-ui.development.js" crossorigin="anonymous"></script>
I will be very glad If a genius developer guide me through this. Thanks in advance.



This way I unpacked.
But when opening the screen I get the error as below. It does not see the UMD or CDN reference. It doesn't even recognize HTML CDN import.
