File tree 4 files changed +28
-6
lines changed 4 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,10 @@ const moduleRegExp = /\.module(s)?\.\w+$/i;
126
126
const icssRegExp = / \. i c s s \. \w + $ / i;
127
127
128
128
function getModulesOptions ( rawOptions , loaderContext ) {
129
- const { resourcePath } = loaderContext ;
129
+ const resourcePath =
130
+ // eslint-disable-next-line no-underscore-dangle
131
+ loaderContext . _module . matchResource || loaderContext . resourcePath ;
132
+
130
133
let isIcss ;
131
134
132
135
if ( typeof rawOptions . modules === "undefined" ) {
Original file line number Diff line number Diff line change @@ -675,8 +675,8 @@ Array [
675
675
"",
676
676
],
677
677
Array [
678
- "plain.scss!=!../../src/index.js?[ident] !./index-loader-syntax-sass.css",
679
- ".baz {
678
+ "button.modules.css!= !./index-loader-syntax-sass.css",
679
+ ".iuzmhXWrT3_Z-zKS-rMGM {
680
680
width : 5px ;
681
681
} ",
682
682
"",
@@ -733,6 +733,20 @@ Array [
733
733
"./index-loader-syntax.css",
734
734
".a {
735
735
color : red ;
736
+ } ",
737
+ "",
738
+ ],
739
+ Array [
740
+ "button.modules.css!=!./index-loader-syntax-sass.css",
741
+ ".iuzmhXWrT3_Z-zKS-rMGM {
742
+ width : 5px ;
743
+ } ",
744
+ "",
745
+ ],
746
+ Array [
747
+ "button.module.scss!=!./base64-loader/index.js?[ident]!./simple.js",
748
+ "._1DaPRMj4jImbX3XSIzjaR4 {
749
+ color : red ;
736
750
} ",
737
751
"",
738
752
],
Original file line number Diff line number Diff line change
1
+ module . exports = function loader ( content ) {
2
+ return Buffer . from ( this . query . slice ( 1 ) , 'base64' ) . toString ( 'ascii' ) ;
3
+ } ;
Original file line number Diff line number Diff line change 1
- import css from './index-loader-syntax.css' ;
1
+ import one from './index-loader-syntax.css' ;
2
+ import two from 'button.modules.css!=!./index-loader-syntax-sass.css' ;
3
+ import three from './button.module.scss!=!./base64-loader?LmZvbyB7IGNvbG9yOiByZWQ7IH0=!./simple.js' ;
2
4
3
- __export__ = css ;
5
+ __export__ = [ ... one , ... two , ... three ] ;
4
6
5
- export default css ;
7
+ export default [ ... one , ... two , ... three ] ;
You can’t perform that action at this time.
0 commit comments