File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ function defaultGetLocalIdent(
71
71
let relativeMatchResource = "" ;
72
72
73
73
// eslint-disable-next-line no-underscore-dangle
74
- if ( loaderContext . _module . matchResource ) {
74
+ if ( loaderContext . _module && loaderContext . _module . matchResource ) {
75
75
relativeMatchResource = `${ normalizePath (
76
76
// eslint-disable-next-line no-underscore-dangle
77
77
path . relative ( options . context , loaderContext . _module . matchResource )
@@ -138,7 +138,8 @@ const icssRegExp = /\.icss\.\w+$/i;
138
138
function getModulesOptions ( rawOptions , loaderContext ) {
139
139
const resourcePath =
140
140
// eslint-disable-next-line no-underscore-dangle
141
- loaderContext . _module . matchResource || loaderContext . resourcePath ;
141
+ ( loaderContext . _module && loaderContext . _module . matchResource ) ||
142
+ loaderContext . resourcePath ;
142
143
143
144
let isIcss ;
144
145
You can’t perform that action at this time.
0 commit comments