single-spa / standalone-single-spa-webpack-plugin

A webpack plugin for running microfrontends in standalone mode.
MIT License
42 stars 8 forks source link

Modify the mount function in Standalone mode only #21

Open aelhage opened 2 years ago

aelhage commented 2 years ago

I currently have a MFE that expects configuration of authentication to happen in the root config. I am trying to use this plugin to support standalone development, and I am not sure the best way to perform this same configuration in standalone mode only.

My initial thought was to modify the mount function of my MFE to configure authentication, and that does work as expected in standalone mode, but I would not want to include this in production. Does this plugin allow hooking into the standard mount function to change behavior in standalone? Or is there a better approach for running an additional script in standalone only?