Skip to content

Commit

Permalink
fix: Fix load *.module.less, display resolve-url-loader warning. #313
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 30, 2021
1 parent 9e8e17c commit caca4e3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/src/utils/getStyleLoaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,20 @@ export const getStyleLoaders = <T>(
postcssNormalize(),
],
},
sourceMap: options.isEnvProduction ? options.shouldUseSourceMap : options.isEnvDevelopment,
sourceMap: cssOptions.sourceMap,
},
});

if (preProcessor) {
loaders.push({
loader: require.resolve('resolve-url-loader'),
options: {
sourceMap: options.isEnvProduction ? options.shouldUseSourceMap : options.isEnvDevelopment,
sourceMap: cssOptions.sourceMap,
/**
* Build load *module.less, shows resolve-url-loader warning
* https://github.com/kktjs/kkt/issues/313
*/
silent: true,
root: paths.appSrc,
},
});
Expand Down

0 comments on commit caca4e3

Please sign in to comment.