Loading precompiled bundles at runtime in a JS application

657 views Asked by At

Currently, I have a React application built with Webpack 1.15.0.

I want to load into my application one or more precompiled bundles at runtime, like in a plugin system. The main application doesn't know the names of these bundles, but it knows that they will be in a specific directory.

I found this solution: Solution: load independently compiled Webpack 2 bundles dynamically but it seems a bit complex.

Can I accomplish this in a simpler way by using Webpack, Fusebox, Parcel or any other tool?

1

There are 1 answers

0
Andrea Chiarelli On

Thanks to the help of nchanged I reached a solution to my issue based on Fusebox.

I created a simple POC on GitHub to show how to configure two projects to allow dynamic loading of a pre-compiled bundle.

I hope this can be useful for someone else.