-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebuild dependencies as UMD modules #5
Comments
Yesterday, I figured out how to do this and I was able to use EthicalAd client as a UMD module with this config: https://github.com/readthedocs/ethical-ad-client/pull/148/files#diff-1fb26bc12ac780c7ad7325730ed09fc4c2c3d757c276c3dacc44bfe20faf166fR16 output: {
libraryTarget: "umd", |
Yup that's the option. The work here is to break up the webpack configuration more, and go from outputting a dev/prod set of bundles to a dev/prod set of bundles for each library type. |
Example is here: readthedocs/doc-diff#9 On second thought, it's not necessary to split up most of our modules any more than they are. We likely just want to switch all of them to UMD instead. Also @humitos you do not need the other options you noted on the call. The EA client sticks out, I think they are using the global/window variable ( |
We only need to polish the work we already done for EthicalAds and doc-diff only.
Besides, I don't think it makes sense to continue supporting/maintaining these Sphinx extensions anymore. We should focus on doctool agnostic solutions we are creating and reduce the overhead that the fact of being an extension involves. |
Opening this here, but the changes are at the included libraries instead. Just a note here for now though.
The reason some of the modules are not exporting functions is because the current bundles are meant to be used directly by the browser (which is the default for Webpack).
We instead intend to use these as UMD modules instead, so will need to output two modules for each library -- one the default browser bundle for direct use, and a UMD module.
Webpack can output multiple builds fairly easily, so this isn't a huge change.
I'll try to put up an example first.
The text was updated successfully, but these errors were encountered: