webpack.config.js 614 B

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