const path = require('path');

module.exports = {
  sections: [
    {
      name: 'documents',
      content: 'docs/button.md',
      components: () => ['./lib/Button/index.tsx', './lib/icon/icon.tsx']
    }
  ],
  moduleAliases: {
    icons: path.resolve(__dirname, 'icons'),
    utils: path.resolve(__dirname, 'utils'),
    lib: path.resolve(__dirname, 'lib')
  },
  webpackConfig: {
    module: {
      rules: [
        {
          test: /\.tsx?$/,
          loader: 'awesome-typescript-loader'
        },
        {
          test: /\.svg$/,
          loader: 'svg-sprite-loader',
        },
        {
          test: /\.scss$/,
          use: ['style-loader', 'css-loader', 'sass-loader']
        }
      ]
    },
  },
  components: 'lib/**/**/*.tsx',
}