webpack.config.js 1.0 KB

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