Skip to content
This repository was archived by the owner on Jan 19, 2023. It is now read-only.

Commit 06d7516

Browse files
committed
Change to isomorphic-style-loader
1 parent 59ea7ee commit 06d7516

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
],
3131
"license": "MIT",
3232
"dependencies": {
33+
"isomorphic-style-loader": "^2.0.0",
3334
"react-modal": "^1.4.0"
3435
},
3536
"peerDependencies": {

src/react-image-lightbox.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,12 @@ class ReactImageLightbox extends Component {
14161416
},
14171417
};
14181418

1419+
// Insert component styles
1420+
if (typeof window === 'object') {
1421+
styles._insertCss();
1422+
}
1423+
1424+
14191425
// DEPRECATION NOTICE
14201426
// All unprefixed classes (listed below) will be removed in v4.0.0.
14211427
// Use their `ril-` prefixed alternatives instead.

webpack.config.dev.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = {
4242
{
4343
test: /\.scss$/,
4444
loaders: [
45-
'style-loader',
45+
'isomorphic-style-loader',
4646
'css-loader?modules&-autoprefixer&importLoaders=1&localIdentName=[local]___[hash:base64:5]',
4747
'postcss-loader',
4848
'sass-loader',

webpack.config.umd.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = {
4848
{
4949
test: /\.scss$/,
5050
loaders: [
51-
'style-loader',
51+
'isomorphic-style-loader',
5252
'css-loader?modules&-autoprefixer&importLoaders=1&localIdentName=[local]___[hash:base64:5]',
5353
'postcss-loader',
5454
'sass-loader',

0 commit comments

Comments
 (0)