fix site style breaks when there is lib directory

This commit is contained in:
afc163 2017-01-20 21:40:53 +08:00
parent bcd3b63c50
commit 52577054ad
2 changed files with 2 additions and 11 deletions

View File

@ -54,7 +54,7 @@ module.exports = {
webpackConfig(config) {
config.resolve.alias = {
'antd/lib': path.join(process.cwd(), 'components'),
antd: process.cwd(),
antd: path.join(process.cwd(), 'index'),
site: path.join(process.cwd(), 'site'),
'react-router': 'react-router/umd/ReactRouter',
};
@ -67,15 +67,6 @@ module.exports = {
},
]);
config.babel.plugins.push([
require.resolve('babel-plugin-import'),
{
style: true,
libraryName: 'antd',
libraryDirectory: 'components',
},
]);
return config;
},
};

View File

@ -1,7 +1,7 @@
import React from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { Select, Modal } from 'antd';
import { version as antdVersion } from 'antd/package.json';
import { version as antdVersion } from '../../../../package.json';
import * as utils from '../utils';
const Option = Select.Option;