• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..22-Sep-2022-

README.mdH A D11-Nov-20211.1 KiB2925

mermaid.min.jsH A D11-Nov-2021871.9 KiB3714

README.md

1# To change mermaid.min.js for IE11
2
31. Clone Mermaid source from Github
41. Change the file `webpack.config.base.js`. Look for `const jsRule = {` and replace that block with
5
6```
7const jsRule = {
8  test: /\.js$/,
9  include: [
10    path.resolve(__dirname, './src'),
11    path.resolve(__dirname, './node_modules/dagre-d3-renderer/lib'),
12    path.resolve(__dirname, './node_modules/@braintree/sanitize-url'),
13    path.resolve(__dirname, './node_modules/dagre'),
14    path.resolve(__dirname, './node_modules/graphlib'),
15    path.resolve(__dirname, './node_modules/he'),
16    path.resolve(__dirname, './node_modules/entity-decode'),
17    path.resolve(__dirname, './node_modules/khroma/dist'),
18    path.resolve(__dirname, './node_modules/stylis')
19  ],
20  use: {
21    loader: 'babel-loader'
22  }
23};
24```
25
26The idea is to add any library used in package.json that is not compatible with IE11
27Then polyfill any JS error in IE11 (e.g, version 8.10.1 needs Number.isInteger polyfill such that js loads without errors)
28
29All trials to polyfill other errors failed (using useBuiltIns: 'usage', corejs: {version: '2.0'} or polyfill.io). IE11 has basic support for flowchart, sequence and er only