webpack.config.js 494 B

12345678910111213141516171819202122
  1. var path = require('path');
  2. var webpack = require('webpack');
  3. var BUILD_DIR = path.resolve(__dirname, 'build');
  4. module.exports = {
  5. entry: './js/index.js',
  6. output: { path: __dirname, filename: 'bundle.js' },
  7. module: {
  8. loaders: [
  9. {
  10. test: /.jsx?$/,
  11. loader: 'babel-loader',
  12. exclude: /node_modules/,
  13. query: {
  14. presets: ['es2015', 'react']
  15. }
  16. },
  17. { test: /\.css$/, loader: "style-loader!css-loader?root=." },
  18. ]
  19. },
  20. };