|
@@ -3,6 +3,7 @@ import os from 'os';
|
|
|
import pageRoutes from './router.config';
|
|
import pageRoutes from './router.config';
|
|
|
import webpackPlugin from './plugin.config';
|
|
import webpackPlugin from './plugin.config';
|
|
|
import defaultSettings from '../src/defaultSettings';
|
|
import defaultSettings from '../src/defaultSettings';
|
|
|
|
|
+import slash from 'slash2';
|
|
|
|
|
|
|
|
const plugins = [
|
|
const plugins = [
|
|
|
[
|
|
[
|
|
@@ -96,8 +97,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
const match = context.resourcePath.match(/src(.*)/);
|
|
const match = context.resourcePath.match(/src(.*)/);
|
|
|
if (match && match[1]) {
|
|
if (match && match[1]) {
|
|
|
- const antdProPath = match[1].replace('.less', '');
|
|
|
|
|
- const arr = antdProPath
|
|
|
|
|
|
|
+ const antdProPath = match[1].replace('.less', '');
|
|
|
|
|
+ const arr = slash(antdProPath)
|
|
|
.split('/')
|
|
.split('/')
|
|
|
.map(a => a.replace(/([A-Z])/g, '-$1'))
|
|
.map(a => a.replace(/([A-Z])/g, '-$1'))
|
|
|
.map(a => a.toLowerCase());
|
|
.map(a => a.toLowerCase());
|