module.exports = {
  entry: {
      module: './lib/module.ts'
  },
  output: {
      publicPath: '/node_modules/@flagbit/beyer-components/',
      filename: './dist/beyer-components.js',
      chunkFilename: './dist/beyer-components.chunk.[id].js',
      libraryTarget: 'umd',
      umdNamedDefine: true
  },
  resolve: {
      // Add '.ts' and '.tsx' as a resolvable extension.
      extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js']
  },
  module: {
      loaders: [
          // all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'
          {
            test: /\.tsx?$/,
            loader: 'ts-loader'
          },
          {
            test: /\.jsx?$/,
            exclude: /node_modules\/(?!bootstrap)/,
            loader: 'babel-loader',
            query: {
              presets: ['es2015']
            }
          },
          {
              test: /\.html$/,
              loader: 'html-loader'
          }
      ]
  }
}