Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. const path = require("path");
  2. const TerserPlugin = require("terser-webpack-plugin")
  3.  
  4. module.exports = {
  5. entry: "./src/index.js",
  6. output: {
  7. filename: "bundle.js",
  8. path: path.resolve(__dirname, "./dist"),
  9. publicPath: "dist/"
  10. },
  11. mode: "none",
  12. module: {
  13. rules: [
  14. {
  15. test: /\.(png|jpg)$/,
  16. use: ["file-loader"]
  17. },
  18. {
  19. test: /\.css$/,
  20. use: ["style-loader", "css-loader"]
  21. },
  22. {
  23. test: /\.scss$/,
  24. use: ["style-loader", "css-loader", "sass-loader"]
  25. },
  26. {
  27. test: /\.js$/,
  28. use: {
  29. loader: "babel-loader",
  30. options: {
  31. presets: ["@babel/env"],
  32. plugins: ["transform-class-properties"]
  33. }
  34. }
  35. }
  36. ]
  37. },
  38. plugins: [
  39. new TerserPlugin()
  40. ]
  41. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement