#1247 fix "window is not defined" with ssr

This commit is contained in:
DCsunset 2020-02-06 20:26:09 -08:00
parent 7e01f9be6e
commit 6f450272b8
1 changed files with 2 additions and 1 deletions

View File

@ -50,7 +50,8 @@ export const jsConfig = () => {
filename: '[name].js',
library: 'mermaid',
libraryTarget: 'umd',
libraryExport: 'default'
libraryExport: 'default',
globalObject: 'typeof self !== "undefined" ? self : this'
},
module: {
rules: [amdRule, jsRule, scssRule, jisonRule]