var path = require('path');

module.exports = {

  entry: './src/index.js',

  output: {
    path: path.join(__dirname, 'dist'),
    filename: 'react-atellier.js',
    library: 'ReactAtellier',
    libraryTarget: 'umd',
  },
  externals: {
      // Use external version of React
      "react": "React"
  },
  module: {
    loaders: [
      {
       test: /\.less$/,
       loader: 'style!css!less?outputStyle=expanded&' +
         'includePaths[]=' + (path.resolve(__dirname, './bower_components')) + '&' +
         'includePaths[]=' + (path.resolve(__dirname, './node_modules'))
      },
      {
        test: /\.less$/,
        loader: 'autoprefixer'
      },
      {
        test: /\.(otf|ttf)$/,
        loader: 'url?limit=100000'
      },
      {
        test: /\.(png|jpg)$/,
        loader: 'url?limit=45000'
      },
      {
        test: /(\.js)$/,
        exclude: [path.resolve(__dirname, 'node_modules')],
        loader: 'babel',
        include: path.join(__dirname, 'src')
      },
    ],
  },

  devServer: {
    contentBase: './example',
    host: 'localhost',
    inline: true,
    info: false,
  },
};

var path = require('path');

module.exports = {

  entry: './src/index.js',

  output: {
    path: path.join(__dirname, 'dist'),
    filename: 'react-atellier.js',
    library: 'ReactAtellier',
    libraryTarget: 'umd',
  },
  externals: {
      // Use external version of React
      'react': 'react',
      'react-dom': 'react-dom'
  },
  module: {
    loaders: [
      {
       test: /\.less$/,
       loader: 'style!css!less?outputStyle=expanded&' +
         'includePaths[]=' + (path.resolve(__dirname, './bower_components')) + '&' +
         'includePaths[]=' + (path.resolve(__dirname, './node_modules'))
      },
      {
        test: /\.less$/,
        loader: 'autoprefixer'
      },
      {
        test: /\.(otf|ttf)$/,
        loader: 'url?limit=100000'
      },
      {
        test: /\.(png|jpg)$/,
        loader: 'url?limit=45000'
      },
      {
        test: /(\.js)$/,
        exclude: [path.resolve(__dirname, 'node_modules')],
        loader: 'babel',
        include: path.join(__dirname, 'src')
      },
    ],
  },

  devServer: {
    contentBase: './example',
    host: 'localhost',
    inline: true,
    info: false,
  },
};

Use external `react` and `react-dom`
fix(webpack): Use external `react` and `react-dom`

Prevent bundling React and ReactDOM to use a single version of React if one is already included.

Refs https://github.com/scup/atellier/issues/33
