webpack.config.js 451 B

12345678910111213141516171819202122
  1. 'use strict';
  2. const path = require('path');
  3. module.exports = {
  4. entry: path.resolve(__dirname, 'src/index.js'),
  5. output: {
  6. path: path.resolve(__dirname, 'assets'),
  7. filename: 'bundle.js'
  8. },
  9. module: {
  10. rules: [
  11. {
  12. test: /\.js$/,
  13. exclude: /node_modules/,
  14. use: {
  15. loader: 'babel-loader'
  16. }
  17. }
  18. ]
  19. }
  20. };