.webpackrc.js 537 Bytes
Newer Older
jim's avatar
jim committed
1
const path = require('path');
niko's avatar
niko committed
2 3

export default {
jim's avatar
jim committed
4
  entry: 'src/index.js',
niko's avatar
niko committed
5
  extraBabelPlugins: [
jim's avatar
jim committed
6 7
    'transform-decorators-legacy',
    ['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }],
niko's avatar
niko committed
8 9 10
  ],
  env: {
    development: {
jim's avatar
jim committed
11 12
      extraBabelPlugins: ['dva-hmr'],
    },
niko's avatar
niko committed
13 14
  },
  alias: {
jim's avatar
jim committed
15
    components: path.resolve(__dirname, 'src/components/'),
niko's avatar
niko committed
16 17
  },
  ignoreMomentLocale: true,
jim's avatar
jim committed
18
  theme: './src/theme.js',
niko's avatar
niko committed
19
  html: {
jim's avatar
jim committed
20
    template: './src/index.ejs',
niko's avatar
niko committed
21
  },
jim's avatar
jim committed
22
  disableDynamicImport: true,
jim's avatar
jim committed
23 24
  publicPath: '/',
  hash: true,
niko's avatar
niko committed
25
};