webpack.config.js 359 B

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