File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ function defaultGetLocalIdent(
7171 let relativeMatchResource = "" ;
7272
7373 // eslint-disable-next-line no-underscore-dangle
74- if ( loaderContext . _module . matchResource ) {
74+ if ( loaderContext . _module && loaderContext . _module . matchResource ) {
7575 relativeMatchResource = `${ normalizePath (
7676 // eslint-disable-next-line no-underscore-dangle
7777 path . relative ( options . context , loaderContext . _module . matchResource )
@@ -138,7 +138,8 @@ const icssRegExp = /\.icss\.\w+$/i;
138138function getModulesOptions ( rawOptions , loaderContext ) {
139139 const resourcePath =
140140 // eslint-disable-next-line no-underscore-dangle
141- loaderContext . _module . matchResource || loaderContext . resourcePath ;
141+ ( loaderContext . _module && loaderContext . _module . matchResource ) ||
142+ loaderContext . resourcePath ;
142143
143144 let isIcss ;
144145
You can’t perform that action at this time.
0 commit comments