webpack.config.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) Jupyter Development Team.
  2. // Distributed under the terms of the Modified BSD License.
  3. // Support for Node 0.10
  4. // See https://github.com/webpack/css-loader/issues/144
  5. require('es6-promise').polyfill();
  6. module.exports = {
  7. entry: './index.js',
  8. output: {
  9. path: __dirname + '/build',
  10. filename: 'bundle.js',
  11. publicPath: 'lab/'
  12. },
  13. node: {
  14. fs: 'empty'
  15. },
  16. bail: true,
  17. devtool: 'source-map',
  18. module: {
  19. rules: [
  20. { test: /\.css$/, use: [ 'style-loader', 'css-loader' ] },
  21. { test: /\.json$/, use: 'json-loader' },
  22. { test: /\.html$/, use: 'file-loader' },
  23. { test: /\.md$/, use: 'raw-loader' },
  24. // jquery-ui loads some images
  25. { test: /\.(jpg|png|gif)$/, use: 'file-loader' },
  26. // required to load font-awesome
  27. { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, use: 'url-loader?limit=10000&mimetype=application/font-woff' },
  28. { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, use: 'url-loader?limit=10000&mimetype=application/font-woff' },
  29. { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, use: 'url-loader?limit=10000&mimetype=application/octet-stream' },
  30. { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, use: 'file-loader' },
  31. { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, use: 'url-loader?limit=10000&mimetype=image/svg+xml' }
  32. ]
  33. }
  34. }