I've created a create-react-app simple application (as a lib) and want to load it inside an HTML page as an external script.
I created a create-react-app with the command
npx create-react-app my-libChanged
my-lib/src/index.jsto this:
- Inside the
my-libdirectory I runyarn build. This generated the following production files:
- Created an external HTML file loading the production version of
my-lib.
I'm getting the following error:






mainand2.js. So in which chunk theAssetsManagerclass is packaged?AssetsManagerclass is defined in thesrc/App.jsfile. And thesrc/App.jsfile is located in themain.[hash].chunk.js, as you can see here.npm run buildwas not meant for this kind of use cases:const a = new AssetsManager(), what are you trying to achieve by doing that?!