-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
42 lines (40 loc) · 1.08 KB
/
webpack.config.js
File metadata and controls
42 lines (40 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const { ImportMapWebpackPlugin } = require("@hackney/webpack-import-map-plugin");
const dotenv = require("dotenv").config();
const webpack = require("webpack");
const singleSpaDefaults = require("webpack-config-single-spa-react-ts");
const { merge } = require("webpack-merge");
module.exports = (webpackConfigEnv, argv) => {
const defaultConfig = singleSpaDefaults({
orgName: "mtfh",
projectName: "processes",
webpackConfigEnv,
argv,
});
return merge(defaultConfig, {
entry: {
processes: defaultConfig.entry,
},
output: {
filename: "[name].[contenthash].js",
uniqueName: "tenure",
},
module: {
rules: [
{
test: /\.scss$/i,
use: ["style-loader", "css-loader", "sass-loader"],
},
],
},
externals: ["react-router-dom", "formik", "yup"],
plugins: [
new webpack.EnvironmentPlugin({
DES_URL: dotenv.DES_URL || "",
}),
new ImportMapWebpackPlugin({
namespace: "@mtfh",
basePath: process.env.APP_CDN || "http://localhost:8990",
}),
],
});
};