Closed lslvxy closed 5 years ago
maybe you need resolve-url-loader
// 51
const sassModulesRule = cloneDeep(cssModulesRule)
sassModulesRule.test = /\.module\.s[ac]ss$/
// fix image url
addAfterRule(sassModulesRule, postcssLoaderMatcher, {
loader: require.resolve('resolve-url-loader')
});
addAfterRule(sassModulesRule, postcssLoaderMatcher, require.resolve('sass-loader'))
addBeforeRule(config.module.rules, fileLoaderMatcher, sassModulesRule)
I copied this module, to transform less
, it's OK.
Closing this issue and archiving this project in favor of Create React App's native support for CSS Modules introduced in v2.
error message
Module not found: Can't resolve 'money_vline.png' in '/Users/xxx/WorkSpace/antd-demo/src/component/Money'
it seem like lost a '/'
if i set
it works