1
0

webpack.config.js 780 B

12345678910111213141516171819202122232425262728293031323334353637
  1. var path = require('path');
  2. var webpack = require('webpack');
  3. module.exports = {
  4. entry: './js/main.js',
  5. mode: 'development',
  6. watch: true,
  7. output: {
  8. path: path.resolve(__dirname, 'build'),
  9. filename: 'ivprog.bundle.js',
  10. library: 'ivprogCore',
  11. libraryTarget: 'umd'
  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. /*optimization: {
  32. splitChunks: {
  33. chunks: 'all'
  34. }
  35. },*/
  36. devtool: 'source-map'
  37. };