webpack.config.js 450 B

12345678910111213141516171819202122232425262728
  1. const path = require("path");
  2. module.exports = {
  3. entry: "./src/app/app.js",
  4. output: {
  5. filename: "main.js",
  6. path: path.resolve(__dirname, "src")
  7. },
  8. module: {
  9. rules: [
  10. {
  11. test: /\.css$/,
  12. use: ["style-loader", "css-loader"]
  13. }
  14. ]
  15. },
  16. module: {
  17. rules: [
  18. {
  19. test: /\.js$/,
  20. exclude: /node_modules/,
  21. use: {
  22. loader: "babel-loader"
  23. }
  24. }
  25. ]
  26. }
  27. };