prod.js 658 B

12345678910111213141516171819202122
  1. // Copyright (c) Meta Platforms, Inc. and affiliates.
  2. // All rights reserved.
  3. // This source code is licensed under the license found in the
  4. // LICENSE file in the root directory of this source tree.
  5. // production config
  6. const { merge } = require("webpack-merge");
  7. const { resolve } = require("path");
  8. const Dotenv = require("dotenv-webpack");
  9. const commonConfig = require("./common");
  10. module.exports = merge(commonConfig, {
  11. mode: "production",
  12. output: {
  13. filename: "js/bundle.[contenthash].min.js",
  14. path: resolve(__dirname, "../../dist"),
  15. publicPath: "/",
  16. },
  17. devtool: "source-map",
  18. plugins: [new Dotenv()],
  19. });