From 533830172c9b273c77488d63253c60dd1dac8b27 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 7 Mar 2023 09:38:51 +0530 Subject: [PATCH] Add UMD back --- .vite/build.ts | 6 ++++++ packages/mermaid/package.json | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.vite/build.ts b/.vite/build.ts index 268db3270..e3c947173 100644 --- a/.vite/build.ts +++ b/.vite/build.ts @@ -62,6 +62,12 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions) sourcemap: true, entryFileNames: `${name}.esm${minify ? '.min' : ''}.mjs`, }, + { + name, + format: 'umd', + sourcemap: true, + entryFileNames: `${name}${minify ? '.min' : ''}.js`, + }, ]; if (core) { diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index e40912c29..190d9e783 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -1,14 +1,16 @@ { "name": "mermaid", - "version": "10.0.2", + "version": "10.0.3-alpha.1", "description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "type": "module", + "main": "./dist/mermaid.min.js", "module": "./dist/mermaid.core.mjs", "types": "./dist/mermaid.d.ts", "exports": { ".": { "types": "./dist/mermaid.d.ts", "import": "./dist/mermaid.core.mjs", + "require": "./dist/mermaid.js", "default": "./dist/mermaid.core.mjs" }, "./*": "./*" @@ -106,8 +108,11 @@ "vitepress-plugin-search": "^1.0.4-alpha.19" }, "files": [ - "dist", + "dist/", "README.md" ], - "sideEffects": false + "sideEffects": false, + "publishConfig": { + "access": "public" + } }