2016-05-27 11:48:08 +08:00
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
2016-05-27 14:31:29 +08:00
|
|
|
port: 8001,
|
2016-05-27 11:48:08 +08:00
|
|
|
source: [
|
|
|
|
'./components',
|
|
|
|
'./docs',
|
|
|
|
'CHANGELOG.md', // TODO: fix it in bisheng
|
|
|
|
],
|
2016-06-09 15:00:44 +08:00
|
|
|
lazyLoad: true,
|
2016-05-27 11:48:08 +08:00
|
|
|
theme: './site/theme',
|
|
|
|
htmlTemplate: './site/theme/static/template.html',
|
|
|
|
plugins: [
|
|
|
|
'bisheng-plugin-description',
|
|
|
|
'bisheng-plugin-toc?maxDepth=2',
|
|
|
|
'bisheng-plugin-react?lang=__react',
|
2016-06-20 14:31:35 +08:00
|
|
|
'bisheng-plugin-antd',
|
2016-05-27 11:48:08 +08:00
|
|
|
],
|
2016-06-16 09:59:14 +08:00
|
|
|
doraConfig: {
|
|
|
|
verbose: true,
|
|
|
|
plugins: ['dora-plugin-upload'],
|
|
|
|
},
|
2016-05-27 11:48:08 +08:00
|
|
|
webpackConfig(config) {
|
|
|
|
config.resolve.alias = {
|
|
|
|
antd: process.cwd(),
|
|
|
|
site: path.join(process.cwd(), 'site'),
|
|
|
|
};
|
|
|
|
|
|
|
|
config.babel.plugins.push([
|
|
|
|
require.resolve('babel-plugin-antd'),
|
|
|
|
{
|
|
|
|
style: true,
|
|
|
|
libraryName: 'antd',
|
|
|
|
libDir: 'components',
|
|
|
|
},
|
|
|
|
]);
|
|
|
|
|
|
|
|
return config;
|
|
|
|
},
|
|
|
|
};
|