mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 15:30:03 +02:00
Merge pull request #1248 from DCsunset/bug/1247_ssr_error
Bug/1247 Fix "window is not defined" with ssr
This commit is contained in:
@@ -50,7 +50,8 @@ export const jsConfig = () => {
|
|||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
library: 'mermaid',
|
library: 'mermaid',
|
||||||
libraryTarget: 'umd',
|
libraryTarget: 'umd',
|
||||||
libraryExport: 'default'
|
libraryExport: 'default',
|
||||||
|
globalObject: 'typeof self !== "undefined" ? self : this'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [amdRule, jsRule, scssRule, jisonRule]
|
rules: [amdRule, jsRule, scssRule, jisonRule]
|
||||||
|
Reference in New Issue
Block a user