webpack.config.js 612 B

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