diff --git a/.webpackrc.js b/.webpackrc.js index da3cc37c8722154fca114975bf6a8844d7c93740..07289577e4a9c4519261076f03898b78eaa14a70 100755 --- a/.webpackrc.js +++ b/.webpackrc.js @@ -38,7 +38,7 @@ export default { return localName; } - let antdProPath = context.resourcePath.match(/src(.*)/)[1]; + let antdProPath = context.resourcePath.match(/src(.*)/)[1].replace('.less', ''); if (context.resourcePath.includes('components')) { antdProPath = antdProPath.replace('components/', ''); } @@ -46,7 +46,6 @@ export default { .split('/') .map(a => a.replace(/([A-Z])/g, '-$1')) .map(a => a.toLowerCase()); - arr.pop(); return `antd-pro${arr.join('-')}-${localName}`.replace('--', '-'); }, },