webpack.config.js 1013 B

1234567891011121314151617181920212223242526
  1. module.exports = {
  2. entry: './build/index.js',
  3. output: {
  4. path: __dirname + '/build',
  5. filename: 'bundle.js',
  6. publicPath: './build/'
  7. },
  8. bail: true,
  9. devtool: 'source-map',
  10. module: {
  11. loaders: [
  12. { test: /\.css$/, use: ['style-loader','css-loader'] },
  13. { test: /\.json$/, use: 'json-loader' },
  14. { test: /\.html$/, use: 'file-loader' },
  15. // jquery-ui loads some images
  16. { test: /\.(jpg|png|gif)$/, use: 'file-loader' },
  17. // required to load font-awesome
  18. { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, use: 'url-loader?limit=10000&mimetype=application/font-woff' },
  19. { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, use: 'url-loader?limit=10000&mimetype=application/font-woff' },
  20. { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, use: 'url-loader?limit=10000&mimetype=application/octet-stream' },
  21. { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, use: 'file-loader' },
  22. { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, use: 'url-loader?limit=10000&mimetype=image/svg+xml' }
  23. ]
  24. }
  25. }