Commit ef3653a8 authored by 愚道's avatar 愚道 Committed by 陈帅

feat: update config file with es6

parent de265e6c
// https://umijs.org/config/ // https://umijs.org/config/
const os = require('os'); import os from 'os';
const pageRoutes = require('./router.config'); import pageRoutes from './router.config';
const webpackplugin = require('./plugin.config'); import webpackplugin from './plugin.config';
const defaultSettings = require('../src/defaultSettings'); import defaultSettings from '../src/defaultSettings';
export default { export default {
// add for transfer to umi // add for transfer to umi
......
// Change theme plugin // Change theme plugin
const MergeLessPlugin = require('antd-pro-merge-less'); import MergeLessPlugin from 'antd-pro-merge-less';
const AntDesignThemePlugin = require('antd-pro-theme-webpack-plugin'); import AntDesignThemePlugin from 'antd-pro-theme-webpack-plugin';
const path = require('path'); import path from 'path';
const plugin = config => { export default config => {
// 将所有 less 合并为一个供 themePlugin使用 // 将所有 less 合并为一个供 themePlugin使用
const outFile = path.join(__dirname, '../.temp/ant-design-pro.less'); const outFile = path.join(__dirname, '../.temp/ant-design-pro.less');
const stylesDir = path.join(__dirname, '../src/'); const stylesDir = path.join(__dirname, '../src/');
...@@ -26,5 +26,3 @@ const plugin = config => { ...@@ -26,5 +26,3 @@ const plugin = config => {
}, },
]); ]);
}; };
module.exports = plugin;
module.exports = [ export default [
// user // user
{ {
path: '/user', path: '/user',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment