webpack.config.js 759 B

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