Skip to content

Commit ad49afc

Browse files
LMulvey40818419
authored andcommitted
Apply fix for window object in UMD builds in Webpack as described in webpack/webpack#6784 (#63)
1 parent bba09df commit ad49afc

File tree

6 files changed

+6
-13
lines changed

6 files changed

+6
-13
lines changed

docs/iframe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ <h1 class="sb-nopreview_heading sb-heading">No Preview</h1>
131131

132132

133133

134-
<script src="static/vendors~iframe.17d44b859bf833d69264.bundle.js" defer></script>
134+
<script src="static/vendors~iframe.c1d05f099f62abc2da37.bundle.js" defer></script>
135135

136136

137137

docs/static/vendors~iframe.17d44b859bf833d69264.bundle.js renamed to docs/static/vendors~iframe.c1d05f099f62abc2da37.bundle.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/static/vendors~iframe.17d44b859bf833d69264.bundle.js.map renamed to docs/static/vendors~iframe.c1d05f099f62abc2da37.bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "dist/ReactCodeInput.js",
66
"scripts": {
77
"start": "npm run storybook",
8-
"build": "rm -r docs && mkdir docs && build-storybook -o docs && webpack && cd styles && sass style.scss style.css && cd ../ && ./postbuild.sh",
8+
"build": "rm -r docs && mkdir docs && build-storybook -o docs && webpack && cd styles && sass style.scss style.css",
99
"test": "cross-env NODE_ENV=test jest --silent",
1010
"test:coverage": "cross-env NODE_ENV=test jest --silent --coverage",
1111
"codecov": "codecov -f ./coverage/*.json",

postbuild.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = [
77
mode: 'production',
88
output: {
99
path: path.resolve(__dirname, 'dist'),
10+
globalObject: 'typeof self !== \'undefined\' ? self : this',
1011
filename: 'ReactCodeInput.js',
1112
libraryTarget: 'umd',
1213
library: 'ReactCodeInput',

0 commit comments

Comments
 (0)