Skip to content

Commit dde81c4

Browse files
authored
Merge pull request #82 from ganderzz/bugfix/fix-ssr-window
Fix issue where window is undefined in Node
2 parents 8a2e91e + dfc0be7 commit dde81c4

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

config/webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ module.exports = {
99
publicPath: path.resolve(__dirname, ".."),
1010
filename: "react-scroll-to.js",
1111
library: ["react-scroll-to"],
12-
libraryTarget: "umd"
12+
libraryTarget: "umd",
13+
globalObject: "typeof self !== 'undefined' ? self : this"
1314
},
1415
context: path.resolve(__dirname, ".."),
1516
resolve: {

yarn.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -850,14 +850,6 @@
850850
resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz#8013f2af54a2b7d735f71560ff360d3a8176a87b"
851851
integrity sha512-vTCdPp/T/Q3oSqwHmZ5Kpa9oI7iLtGl3RQaA/NyLHikvcrPxACkkKVr/XzkSPJWXHRhKGzVvb0urJsbMlRxi1Q==
852852

853-
"@storybook/addon-options@^4.0.2":
854-
version "4.0.2"
855-
resolved "https://registry.yarnpkg.com/@storybook/addon-options/-/addon-options-4.0.2.tgz#76302ecbc8f8aec20026d90d850c591e5ac6bde2"
856-
integrity sha512-x7tiFhVPbU5ca5lpj+5PF+Tj2PsdBb0pMUi94z6wvvh+S4+7BxTgHIqtGpQfLbgpcXXQkL/kGpEC1JYoz5QdrA==
857-
dependencies:
858-
"@storybook/addons" "4.0.2"
859-
util-deprecate "^1.0.2"
860-
861853
"@storybook/addons@4.0.2":
862854
version "4.0.2"
863855
resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-4.0.2.tgz#95fa2384c122953359693849abd711a1611a9bcf"

0 commit comments

Comments
 (0)