You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
688 B

2 years ago
  1. const path = require("path");
  2. const webpack = require("webpack");
  3. module.exports = {
  4. devServer: {
  5. contentBase: path.join(__dirname, "dist"),
  6. port: 9000,
  7. },
  8. devtool: "inline-source-map",
  9. entry: ["./index.ts"],
  10. mode: process.env.NODE_ENV === "production" ? "production" : "development",
  11. module: {
  12. rules: [
  13. {
  14. test: /\.ts$/,
  15. exclude: /node_modules/,
  16. use: "ts-loader",
  17. },
  18. ],
  19. },
  20. output: {
  21. path: path.join(__dirname, "dist", "build"),
  22. filename: "bundle.js",
  23. },
  24. performance: {
  25. maxEntrypointSize: 512000,
  26. maxAssetSize: 512000,
  27. },
  28. plugins: [new webpack.EnvironmentPlugin({ NODE_ENV: "development" })],
  29. };