Skip to content

Commit fcc8a5c

Browse files
committed
fix(webpack): allow shared style import in main file for setup with shadowDom
1 parent 03f9804 commit fcc8a5c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

webpack/webpack.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module.exports = function(env/* @if jasmine || tape || mocha*/, { runTest }/* @e
6262
{ test: /\.css$/i, use: [ "style-loader", cssLoader, postcssLoader ] },
6363
// @endif
6464
// @if shadow-dom
65-
{ test: /\.css$/i, issuer: /\.(js|ts)$/, use: [ "style-loader", cssLoader, postcssLoader ] },
65+
{ test: /\.css$/i, issuer: /\.(js|ts)$/, use: [ "to-string-loader", "style-loader", cssLoader, postcssLoader ] },
6666
{ test: /\.css$/i, issuer: /\.html$/, use: [ "to-string-loader", cssLoader, postcssLoader ] },
6767
// @endif
6868
// @endif
@@ -71,7 +71,7 @@ module.exports = function(env/* @if jasmine || tape || mocha*/, { runTest }/* @e
7171
{ test: /\.less$/i, use: [ "style-loader", cssLoader, postcssLoader, "less-loader" ] },
7272
// @endif
7373
// @if shadow-dom
74-
{ test: /\.less$/i, issuer: /\.(js|ts)$/, use: [ "style-loader", cssLoader, postcssLoader, "less-loader" ] },
74+
{ test: /\.less$/i, issuer: /\.(js|ts)$/, use: [ "to-string-loader", "style-loader", cssLoader, postcssLoader, "less-loader" ] },
7575
{ test: /\.less$/i, issuer: /\.html$/, use: [ "to-string-loader", cssLoader, postcssLoader, "less-loader" ] },
7676
// @endif
7777
// @endif
@@ -80,8 +80,8 @@ module.exports = function(env/* @if jasmine || tape || mocha*/, { runTest }/* @e
8080
{ test: /\.scss$/i, use: [ "style-loader", cssLoader, postcssLoader, { loader: "sass-loader", options: { sassOptions: { includePaths: ["node_modules"] } } } ] },
8181
// @endif
8282
// @if shadow-dom
83-
{ test: /\.scss$/i, issuer: /\.(js|ts)$/, use: [ "style-loader", cssLoader, postcssLoader, { loader: "sass-loader", options: { sassOptions: { includePaths: ["node_modules"] } } } ] },
84-
{ test: /\.scss$/i, issuer: /\.html$/, use: [ "to-string-loader", cssLoader, postcssLoader, { loader: "sass-loader", options: { sassOptions: { includePaths: ["node_modules"] } } } ] },
83+
{ test: /\.scss$/i, issuer: /\.(js|ts)$/, use: [ "to-string-loader", "style-loader", cssLoader, postcssLoader, { loader: "sass-loader", options: { sassOptions: { includePaths: ["node_modules"] } } } ] },
84+
{ test: /\.scss$/i, issuer: /\.html$/, use: [ "to-string-loader", "to-string-loader", cssLoader, postcssLoader, { loader: "sass-loader", options: { sassOptions: { includePaths: ["node_modules"] } } } ] },
8585
// @endif
8686
// @endif
8787
// @if babel

0 commit comments

Comments
 (0)