mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
Fix Webpack global function definition, including hot module replacement (#1435)
* Upgrade webpack-cli to 3.0.1 * Wrap output.globalObject in parentheses Fix global function definition, such as hot module update.
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
"uglifyjs-webpack-plugin": "^1.2.5",
|
||||
"webpack": "^4.9.1",
|
||||
"webpack-bundle-analyzer": "^2.13.0",
|
||||
"webpack-cli": "^3.0.0",
|
||||
"webpack-cli": "^3.0.1",
|
||||
"webpack-dev-server": "^3.1.4"
|
||||
},
|
||||
"bin": "cli.js",
|
||||
|
@@ -59,7 +59,7 @@ function createConfig(target /*: Target */, dev /*: boolean */,
|
||||
libraryExport: 'default',
|
||||
// Enable output modules to be used in browser or Node.
|
||||
// See: https://github.com/webpack/webpack/issues/6522
|
||||
globalObject: "typeof self !== 'undefined' ? self : this",
|
||||
globalObject: "(typeof self !== 'undefined' ? self : this)",
|
||||
path: path.resolve(__dirname, 'build'),
|
||||
publicPath: dev ? '/' : '',
|
||||
},
|
||||
|
Reference in New Issue
Block a user