mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-26 04:00:13 +08:00
43 lines
958 B
JavaScript
43 lines
958 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
port: 8001,
|
|
source: [
|
|
'./components',
|
|
'./docs',
|
|
'CHANGELOG.md', // TODO: fix it in bisheng
|
|
],
|
|
lazyLoad: true,
|
|
theme: './site/theme',
|
|
htmlTemplate: './site/theme/static/template.html',
|
|
plugins: [
|
|
'bisheng-plugin-description',
|
|
'bisheng-plugin-toc?maxDepth=2&keepElem',
|
|
'bisheng-plugin-react?lang=__react',
|
|
'bisheng-plugin-antd',
|
|
],
|
|
doraConfig: {
|
|
verbose: true,
|
|
plugins: ['dora-plugin-upload'],
|
|
},
|
|
webpackConfig(config) {
|
|
config.resolve.alias = {
|
|
'antd/lib': path.join(process.cwd(), 'components'),
|
|
antd: process.cwd(),
|
|
site: path.join(process.cwd(), 'site'),
|
|
'react-router': 'react-router/umd/ReactRouter',
|
|
};
|
|
|
|
config.babel.plugins.push([
|
|
require.resolve('babel-plugin-antd'),
|
|
{
|
|
style: true,
|
|
libraryName: 'antd',
|
|
libDir: 'components',
|
|
},
|
|
]);
|
|
|
|
return config;
|
|
},
|
|
};
|