canopy-webpack-config 4.4.2 → 4.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -34,6 +34,11 @@ const externalPatterns = [
|
|
|
34
34
|
/^react\/lib.*/,
|
|
35
35
|
/^react$/,
|
|
36
36
|
/^rxjs\/?.*$/,
|
|
37
|
+
// Built out of the common-dependencies repo rather than npm. They keep their bare
|
|
38
|
+
// specifiers under ESM, same as under SystemJS, so consuming source needs no edit —
|
|
39
|
+
// online-listener in particular owns a singleton observable that must not be duplicated.
|
|
40
|
+
/^online-listener$/,
|
|
41
|
+
/^cp-analytics$/,
|
|
37
42
|
/^single-spa-canopy$/,
|
|
38
43
|
/^single-spa$/,
|
|
39
44
|
/^@canopytax\//,
|
|
@@ -87,6 +92,8 @@ export default function (name, overridesConfig = {}, options = {}) {
|
|
|
87
92
|
library: { type: "module" }, // emit as native ESM
|
|
88
93
|
environment: { module: true },
|
|
89
94
|
chunkFormat: "module",
|
|
95
|
+
devtoolNamespace: name,
|
|
96
|
+
devtoolModuleFilenameTemplate: "webpack://[namespace]/[resource-path]",
|
|
90
97
|
},
|
|
91
98
|
|
|
92
99
|
experiments: {
|
|
@@ -96,7 +103,6 @@ export default function (name, overridesConfig = {}, options = {}) {
|
|
|
96
103
|
optimization: {
|
|
97
104
|
runtimeChunk: false,
|
|
98
105
|
splitChunks: { chunks: "async" },
|
|
99
|
-
minimize: false,
|
|
100
106
|
},
|
|
101
107
|
|
|
102
108
|
externalsType: "module",
|
|
@@ -121,20 +127,7 @@ export default function (name, overridesConfig = {}, options = {}) {
|
|
|
121
127
|
{
|
|
122
128
|
test: /\.(js|jsx|ts|tsx)$/,
|
|
123
129
|
exclude: /node_modules/,
|
|
124
|
-
use:
|
|
125
|
-
loader: "babel-loader",
|
|
126
|
-
options: {
|
|
127
|
-
presets: [
|
|
128
|
-
[
|
|
129
|
-
"@babel/preset-env",
|
|
130
|
-
{ targets: "defaults", modules: false },
|
|
131
|
-
],
|
|
132
|
-
["@babel/preset-react", { runtime: "automatic" }],
|
|
133
|
-
"@babel/preset-typescript",
|
|
134
|
-
],
|
|
135
|
-
plugins: ["@babel/plugin-transform-runtime"],
|
|
136
|
-
},
|
|
137
|
-
},
|
|
130
|
+
use: "babel-loader",
|
|
138
131
|
},
|
|
139
132
|
],
|
|
140
133
|
},
|
|
@@ -64,6 +64,8 @@ module.exports = function (name, overridesConfig = {}, options = {}) {
|
|
|
64
64
|
},
|
|
65
65
|
path: path.resolve(process.cwd(), "build"),
|
|
66
66
|
chunkFilename: "[name].js",
|
|
67
|
+
devtoolNamespace: name,
|
|
68
|
+
devtoolModuleFilenameTemplate: "webpack://[namespace]/[resource-path]",
|
|
67
69
|
},
|
|
68
70
|
mode: env.dev || isDevServer ? "development" : "production",
|
|
69
71
|
module: {
|