Add UMD back

This commit is contained in:
Sidharth Vinod 2023-03-07 09:38:51 +05:30
parent 7bea44e752
commit 533830172c
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
2 changed files with 14 additions and 3 deletions

View File

@ -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) {

View File

@ -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"
}
}