Skip to content

Commit a2ffa13

Browse files
committed
fix($style-loader): upgrade style-loader
1 parent 22864e3 commit a2ffa13

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var NS = fs.realpathSync(__dirname);
1717
module.exports = function(source) {
1818
if(this.cacheable) this.cacheable();
1919
// Even though this gets overwritten if extract+remove are true, without it, the runtime doesn't get added to the chunk
20-
return `require("style-loader/addStyles.js");
20+
return `require("style-loader/lib/addStyles.js");
2121
if (module.hot) { require('${require.resolve("./hotModuleReplacement.js")}'); }
2222
${source}`;
2323
};
@@ -138,7 +138,7 @@ module.exports.pitch = function(request) {
138138
/*__START_CSS__*/
139139
var moduleId = ${jsesc(text[0][0], jsescOpts)};
140140
var css = ${jsesc(text[0][1], jsescOpts)};
141-
var addStyles = require("style-loader/addStyles.js");
141+
var addStyles = require("style-loader/lib/addStyles.js");
142142
addStyles([[moduleId, css]], "");
143143
/*__END_CSS__*/
144144

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"jsesc": "^2.5.1",
3535
"loader-utils": "^1.0.2",
3636
"schema-utils": "^0.3.0",
37-
"style-loader": "^0.16.1",
37+
"style-loader": "^0.18.2",
3838
"webpack-sources": "^1.0.1"
3939
},
4040
"devDependencies": {

yarn.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3839,11 +3839,12 @@ strip-json-comments@2.0.1, strip-json-comments@~2.0.1:
38393839
version "2.0.1"
38403840
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
38413841

3842-
style-loader@^0.16.1:
3843-
version "0.16.1"
3844-
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.16.1.tgz#50e325258d4e78421dd9680636b41e8661595d10"
3842+
style-loader@^0.18.2:
3843+
version "0.18.2"
3844+
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.18.2.tgz#cc31459afbcd6d80b7220ee54b291a9fd66ff5eb"
38453845
dependencies:
38463846
loader-utils "^1.0.2"
3847+
schema-utils "^0.3.0"
38473848

38483849
supports-color@3.1.2:
38493850
version "3.1.2"

0 commit comments

Comments
 (0)