diff --git a/package.json b/package.json index 7c37be56..c9876287 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ }, "main": "dist/index.cjs.js", "module": "dist/index.esm.js", + "umd": "dist/index.umd.js", "types": "dist/types/src/patchmap.d.ts", "scripts": { "build": "tsc && rollup -c", diff --git a/rollup.config.mjs b/rollup.config.mjs index 08cad029..b0834b5a 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -11,12 +11,18 @@ export default [ { file: pkg.main, format: 'cjs', - exportess: 'named', + exports: 'named', }, { file: pkg.module, format: 'esm', }, + { + file: pkg.umd, + format: 'umd', + name: 'Patchmap', + inlineDynamicImports: true, + }, ], plugins: [ resolve(),