Skip to content
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

Add UMD build #100

Closed
jaredpalmer opened this issue Jul 4, 2017 · 6 comments
Closed

Add UMD build #100

jaredpalmer opened this issue Jul 4, 2017 · 6 comments

Comments

@jaredpalmer
Copy link
Contributor

Selfishly want this for forthcoming Formik docs site.

@jaredpalmer
Copy link
Contributor Author

@jquense would you merge a PR that updates tooling with Rollup and adds this?

@jquense
Copy link
Owner

jquense commented Jul 23, 2017

Sure!

@ravilution
Copy link

I need this badly as well. Please build a UMD that can be accessed via https://unpkg.com/.

@macklinu
Copy link

macklinu commented Oct 1, 2018

Some initial thoughts on resolving this issue:

  • Update rollup.config.js to output a UMD bundle:
diff --git a/rollup.config.js b/rollup.config.js
index 442db4e..ae8c725 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -38,6 +38,11 @@ module.exports = [
         file: 'dist/yup.esm.js',
         format: 'es',
       },
+      {
+        file: 'dist/yup.umd.js',
+        format: 'umd',
+        name: 'Yup',
+      },
     ],
     plugins: [...base.plugins, filesize()],
   },
  • Update package.json#main to point to the UMD bundle instead of the CommonJS bundle (possibly?)
  • Update the build npm script to run Rollup in some way

What else might be involved here? Interested in helping resolve this.

@jquense jquense closed this as completed Jan 28, 2019
@mikabytes
Copy link

Why was this issue closed? We're also looking for a UMD build of Yup, and there seem to be people interested in helping out adding support for this?

@lasseborly
Copy link

This is still very much relevant 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants