webpack.config.js 698 B

1234567891011121314151617181920212223242526272829303132
  1. var path = require('path');
  2. var webpack = require('webpack');
  3. module.exports = {
  4. //entry: './js/main.js',
  5. entry: './js/main-sidebar.js',
  6. mode: 'development',
  7. watch: true,
  8. output: {
  9. path: path.resolve(__dirname, 'build'),
  10. filename: 'ivprog.bundle.js',
  11. library: 'ivprogCore'
  12. },
  13. node: {
  14. fs: 'empty',
  15. },
  16. module: {
  17. rules: [{
  18. test: /\.js$/,
  19. loader: 'babel-loader',
  20. query: {
  21. presets: ['env']
  22. }
  23. }, {
  24. test: /\.g4/,
  25. loader: 'antlr4-webpack-loader'
  26. }]
  27. },
  28. stats: {
  29. colors: true
  30. },
  31. devtool: 'source-map'
  32. };