webpack.config.js 1007 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. var buildExtension = require('@jupyterlab/extension-builder/lib/builder').buildExtension;
  7. console.log('Generating bundles...');
  8. buildExtension({
  9. name: 'main',
  10. entry: './index',
  11. outputDir: './build',
  12. config: {
  13. output: {
  14. publicPath: 'lab/'
  15. }
  16. }
  17. });
  18. buildExtension({
  19. name: 'extensions',
  20. entry: './extensions',
  21. outputDir: './build',
  22. config: {
  23. output: {
  24. publicPath: 'lab/'
  25. },
  26. module: {
  27. noParse: [/xterm\.js/] // Xterm ships a UMD module
  28. }
  29. }
  30. });
  31. module.exports = {
  32. entry: {
  33. loader: './loader'
  34. },
  35. output: {
  36. path: __dirname + '/build',
  37. filename: '[name].bundle.js',
  38. libraryTarget: 'this',
  39. library: 'jupyter'
  40. },
  41. node: {
  42. fs: 'empty'
  43. },
  44. debug: true,
  45. bail: true,
  46. devtool: 'source-map'
  47. }