65 Commits

Author SHA1 Message Date
Sidharth Vinod
b4af820ed1
Fix mjs resolution 2022-09-14 12:04:22 +05:30
Sidharth Vinod
ac629c91d6
Fix import errors 2022-09-14 12:01:47 +05:30
Sidharth Vinod
5434cfc89d
feat: Remove webpack 2022-09-13 11:26:44 +05:30
Sidharth Vinod
a87abc00c6
Add diagramAPI to outfile 2022-09-13 11:25:14 +05:30
Alois Klink
3f76eb0ac2
docs: update mermaid.core.* JSDoc
Fix typo and add that `mermaid.core.*` is compatible with Vite.
2022-09-12 06:21:57 +01:00
Alois Klink
37aaca0090
build: convert core build to unbundled ESM
The `mermaid.core.js` build was previously a UMD build that did not
have `node_modules` bundled.

This was designed for users to add `mermaid` to their own apps,
then bundle with Webpack/ESBuild.
Hence the bundle test in `cypress/platform/bundle-test.js`.

As ESBuild does not support UMD, I've switched the `mermaid.core.js`
to instead use ESM, as Mermaid now requires ESM
(due to d3 requiring ESM). All modern bundlers also support ESM.
2022-09-11 21:56:30 +01:00
Alois Klink
48a899f7a9
build: remove main function from .jison files
When converting a `.jison` file into a CommonJS module,
jison by default adds a main() function that calls `require("fs");`

Even though the main function is never used in the browser,
because `fs` is a Node.JS only module, this causes some esbuild issues.

To disable this, we can just set an empty main to the jison generator.
2022-09-11 21:56:26 +01:00
Sidharth Vinod
5148acb20f
Specify iife format 2022-09-09 17:49:11 +05:30
Sidharth Vinod
c8d3c3ac4f
Correct name umd -> iife 2022-09-09 17:48:09 +05:30
Sidharth Vinod
1029ce4527
fix: Add .core build. 2022-09-09 17:32:13 +05:30
Sidharth Vinod
3a179170bb
Surface jison errors
Co-authored-by: Alois Klink <alois@aloisklink.com>
2022-09-06 20:23:46 +05:30
Sidharth Vinod
99923fcd0f
Test - esbuild 2022-09-02 11:08:14 +05:30
Sidharth Vinod
6be05e9948
Esbuild with types 2022-09-02 00:34:03 +05:30
Sidharth Vinod
fe3bb0b6c0
Typescript 2022-09-01 20:41:31 +05:30
Sidharth Vinod
d67e2723c6
Serve 2022-09-01 13:38:02 +05:30