@trackunit/iris-app 1.9.23 → 1.10.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## 1.10.1 (2026-01-12)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated iris-app-build-utilities to 1.10.1
6
+ - Updated iris-app-webpack-plugin to 1.10.1
7
+ - Updated iris-app-api to 1.13.1
8
+ - Updated react-test-setup to 1.7.1
9
+ - Updated shared-utils to 1.12.1
10
+
11
+ ## 1.10.0 (2026-01-12)
12
+
13
+ ### 🚀 Features
14
+
15
+ - add rollup-plugin-visualizer for bundle analysis ([6db228d8f14](https://github.com/Trackunit/manager/commit/6db228d8f14))
16
+
17
+ ### 🧱 Updated Dependencies
18
+
19
+ - Updated iris-app-build-utilities to 1.10.0
20
+ - Updated iris-app-webpack-plugin to 1.10.0
21
+ - Updated iris-app-api to 1.13.0
22
+ - Updated react-test-setup to 1.7.0
23
+ - Updated shared-utils to 1.12.0
24
+
25
+ ### ❤️ Thank You
26
+
27
+ - Mikkel Thorbjørn Andersen
28
+
1
29
  ## 1.9.23 (2026-01-09)
2
30
 
3
31
  ### 🧱 Updated Dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app",
3
- "version": "1.9.23",
3
+ "version": "1.10.1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "main": "src/index.js",
6
6
  "generators": "./generators.json",
@@ -32,9 +32,9 @@
32
32
  "@npmcli/arborist": "^7.3.1",
33
33
  "webpack-bundle-analyzer": "^4.8.0",
34
34
  "win-ca": "^3.5.1",
35
- "@trackunit/shared-utils": "1.11.22",
36
- "@trackunit/iris-app-api": "1.12.22",
37
- "@trackunit/iris-app-webpack-plugin": "1.9.22",
35
+ "@trackunit/shared-utils": "1.12.1",
36
+ "@trackunit/iris-app-api": "1.13.1",
37
+ "@trackunit/iris-app-webpack-plugin": "1.10.1",
38
38
  "tslib": "^2.6.2"
39
39
  },
40
40
  "types": "./src/index.d.ts",
@@ -2,10 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getDefaultConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const iris_app_api_1 = require("@trackunit/iris-app-api");
6
5
  const iris_app_build_utilities_1 = require("@trackunit/iris-app-build-utilities");
7
6
  const iris_app_webpack_plugin_1 = require("@trackunit/iris-app-webpack-plugin");
8
- const shared_utils_1 = require("@trackunit/shared-utils");
9
7
  const path = tslib_1.__importStar(require("path"));
10
8
  const webpack = tslib_1.__importStar(require("webpack"));
11
9
  require("webpack-dev-server");
@@ -29,39 +27,12 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
29
27
  */
30
28
  const getDefaultConfig = async (mode, nxRootDir, appDir, irisAppManifest) => {
31
29
  const relativeAppDir = appDir.split(nxRootDir)[1] || "<unknown appdir>";
32
- const iconPaths = irisAppManifest.extensions
33
- .map(extension => {
34
- if (extension.type === "FLEET_EXTENSION" && extension.menuItem.image && (0, iris_app_api_1.isIconByPath)(extension.menuItem.image)) {
35
- return {
36
- extensionId: extension.id,
37
- path: extension.menuItem.image.path,
38
- sourceRoot: extension.sourceRoot,
39
- };
40
- }
41
- return null;
42
- })
43
- .filter(shared_utils_1.truthy);
44
- const widgetIconPaths = irisAppManifest.extensions
45
- .map(extension => {
46
- if (extension.type === "WIDGET_EXTENSION" &&
47
- extension.footer?.poweredByImage &&
48
- (0, iris_app_api_1.isImageByPath)(extension.footer.poweredByImage)) {
49
- return {
50
- extensionId: extension.id,
51
- path: extension.footer.poweredByImage.path,
52
- sourceRoot: extension.sourceRoot,
53
- };
54
- }
55
- if (extension.type === "WIDGET_EXTENSION" && extension.header.image && (0, iris_app_api_1.isIconByPath)(extension.header.image)) {
56
- return {
57
- extensionId: extension.id,
58
- path: extension.header.image.path,
59
- sourceRoot: extension.sourceRoot,
60
- };
61
- }
62
- return null;
63
- })
64
- .filter(shared_utils_1.truthy);
30
+ const copyPatterns = (0, iris_app_build_utilities_1.getCopyPatterns)({
31
+ nxRootDir,
32
+ appDir,
33
+ manifest: irisAppManifest,
34
+ mode,
35
+ });
65
36
  return {
66
37
  mode: mode,
67
38
  output: {
@@ -175,7 +146,7 @@ const getDefaultConfig = async (mode, nxRootDir, appDir, irisAppManifest) => {
175
146
  nxRootDir,
176
147
  manifest: irisAppManifest,
177
148
  }),
178
- shared: await (0, iris_app_build_utilities_1.getSharedDependencies)({ manifest: irisAppManifest }),
149
+ shared: (0, iris_app_build_utilities_1.getSharedDependencies)({ manifest: irisAppManifest }),
179
150
  }),
180
151
  new iris_app_webpack_plugin_1.TrackunitIrisAppWebpackPlugin({
181
152
  nxRootDir: nxRootDir,
@@ -183,27 +154,7 @@ const getDefaultConfig = async (mode, nxRootDir, appDir, irisAppManifest) => {
183
154
  manifest: irisAppManifest,
184
155
  }),
185
156
  new CopyWebpackPlugin({
186
- patterns: [
187
- ...irisAppManifest.extensions
188
- .filter(extension => iris_app_api_1.serverSideExtensionTypes.includes(extension.type))
189
- .map(extension => ({
190
- //globs must use / in path to be valid
191
- from: extension.sourceRoot.replace(/\\/g, "/"),
192
- to: path.join(nxRootDir, "dist", relativeAppDir, "serverside", extension.id),
193
- })),
194
- {
195
- //globs must use / in path to be valid
196
- from: path
197
- .join(path.resolve(relativeAppDir.substring(1), "assets"), "**", "(*.png|*.svg|*.jpg|*.jpeg|*.webp|*.md)")
198
- .replace(/\\/g, "/"),
199
- to: path.resolve(nxRootDir, "dist"),
200
- },
201
- ...[...iconPaths, ...widgetIconPaths].map(iconPath => ({
202
- //globs must use / in path to be valid
203
- from: path.join(iconPath.sourceRoot, iconPath.path).replace(/\\/g, "/"),
204
- to: path.join(nxRootDir, "dist", relativeAppDir, iconPath.extensionId, iconPath.path),
205
- })),
206
- ],
157
+ patterns: copyPatterns,
207
158
  }),
208
159
  BundleAnalyzerPlugin,
209
160
  ].filter(Boolean),
@@ -1 +1 @@
1
- {"version":3,"file":"defaultWebpackConfig.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app/src/executors/utils/defaultWebpackConfig.ts"],"names":[],"mappings":";;;;AAAA,0DAAiH;AACjH,kFAK6C;AAC7C,gFAAmF;AACnF,0DAAiD;AACjD,mDAA6B;AAC7B,yDAAmC;AACnC,8BAA4B;AAI5B,IAAI,oBAAoB,GAAyC,IAAI,CAAC;AACtE,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;IAC1C,6EAA6E;IAC7E,iEAAiE;IACjE,MAAM,+BAA+B,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC,oBAAoB,CAAC;IAChG,oBAAoB,GAAG,IAAI,+BAA+B,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC;AACzF,CAAC;AAED,iEAAiE;AACjE,MAAM,iBAAiB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEzD;;;;;;;;GAQG;AACI,MAAM,gBAAgB,GAAG,KAAK,EACnC,IAAkC,EAClC,SAAiB,EACjB,MAAc,EACd,eAAgC,EACD,EAAE;IACjC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,kBAAkB,CAAC;IAExE,MAAM,SAAS,GAAG,eAAe,CAAC,UAAU;SACzC,GAAG,CAAC,SAAS,CAAC,EAAE;QACf,IAAI,SAAS,CAAC,IAAI,KAAK,iBAAiB,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,IAAI,IAAA,2BAAY,EAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/G,OAAO;gBACL,WAAW,EAAE,SAAS,CAAC,EAAE;gBACzB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI;gBACnC,UAAU,EAAE,SAAS,CAAC,UAAU;aACjC,C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ACtE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;wBACjB,sCAAsC;wBACtC,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;wBAC9C,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,CAAC;qBAC7E,CAAC,CAAC;oBACL;wBACE,sCAAsC;wBACtC,IAAI,EAAE,IAAI;6BACP,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAE,wCAAwC,CAAC;6BACzG,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;wBACtB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC;qBACpC;oBACD,GAAG,CAAC,GAAG,SAAS,EAAE,GAAG,eAAe,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;wBACrD,sCAAsC;wBACtC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;wBACvE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC;qBACtF,CAAC,CAAC;iBACJ;aACF,CAAC;YACF,oBAAoB;SACrB,CAAC,MAAM,CAAC,OAAO,CAAC;KAClB,CAAC;AACJ,CAAC,CAAC;AAlMW,QAAA,gBAAgB,oBAkM3B","sourcesContent":["import { IrisAppManifest, isIconByPath, isImageByPath, serverSideExtensionTypes } from \"@trackunit/iris-app-api\";\nimport {\n getAliasesFromTsConfig,\n getExposedExtensions,\n getIrisAppWebpackDevServer,\n getSharedDependencies,\n} from \"@trackunit/iris-app-build-utilities\";\nimport { TrackunitIrisAppWebpackPlugin } from \"@trackunit/iris-app-webpack-plugin\";\nimport { truthy } from \"@trackunit/shared-utils\";\nimport * as path from \"path\";\nimport * as webpack from \"webpack\";\nimport \"webpack-dev-server\";\n\ntype WebpackConfiguration = webpack.Configuration;\n\nlet BundleAnalyzerPlugin: webpack.WebpackPluginInstance | null = null;\nif (process.env.BUNDLE_ANALYSE === \"true\") {\n // doing require here to avoid dependency on webpack-bundle-analyzer directly\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const BundleAnalyzerPluginConstructor = require(\"webpack-bundle-analyzer\").BundleAnalyzerPlugin;\n BundleAnalyzerPlugin = new BundleAnalyzerPluginConstructor({ analyzerMode: \"static\" });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-require-imports\nconst CopyWebpackPlugin = require(\"copy-webpack-plugin\");\n\n/**\n * Gets the default webpack config.\n *\n * @param mode mode either \"production\" or \"development\"\n * @param nxRootDir the root of the nx workspace\n * @param appDir the app directory\n * @param irisAppManifest the iris app manifest\n * @returns { Promise<WebpackConfiguration> } the default webpack config\n */\nexport const getDefaultConfig = async (\n mode: \"production\" | \"development\",\n nxRootDir: string,\n appDir: string,\n irisAppManifest: IrisAppManifest\n): Promise<WebpackConfiguration> => {\n const relativeAppDir = appDir.split(nxRootDir)[1] || \"<unknown appdir>\";\n\n const iconPaths = irisAppManifest.extensions\n .map(extension => {\n if (extension.type === \"FLEET_EXTENSION\" && extension.menuItem.image && isIconByPath(extension.menuItem.image)) {\n return {\n extensionId: extension.id,\n path: extension.menuItem.image.path,\n sourceRoot: extension.sourceRoot,\n };\n }\n return null;\n })\n .filter(truthy);\n\n const widgetIconPaths = irisAppManifest.extensions\n .map(extension => {\n if (\n extension.type === \"WIDGET_EXTENSION\" &&\n extension.footer?.poweredByImage &&\n isImageByPath(extension.footer.poweredByImage)\n ) {\n return {\n extensionId: extension.id,\n path: extension.footer.poweredByImage.path,\n sourceRoot: extension.sourceRoot,\n };\n }\n if (extension.type === \"WIDGET_EXTENSION\" && extension.header.image && isIconByPath(extension.header.image)) {\n return {\n extensionId: extension.id,\n path: extension.header.image.path,\n sourceRoot: extension.sourceRoot,\n };\n }\n\n return null;\n })\n .filter(truthy);\n return {\n mode: mode,\n output: {\n publicPath: \"auto\",\n path: path.join(nxRootDir, \"dist\", relativeAppDir),\n },\n\n entry: {},\n devtool: false,\n devServer: await getIrisAppWebpackDevServer(),\n resolve: {\n extensions: [\".tsx\", \".ts\", \".jsx\", \".js\", \".json\"],\n alias: await getAliasesFromTsConfig({ nxRootDir }),\n },\n module: {\n rules: [\n {\n test: /\\.svg$/,\n issuer: /\\.[jt]sx?$/,\n oneOf: [\n {\n resourceQuery: /react/, // if import has ?react in the query so .svg?react\n use: [\n {\n loader: \"@svgr/webpack\",\n options: {\n typescript: true,\n svgo: false,\n titleProp: true,\n ref: true,\n exportType: \"named\",\n namedExport: \"ReactComponent\",\n },\n },\n ],\n },\n {\n type: \"asset/resource\",\n generator: {\n filename: mode === \"production\" ? \"static/media/[hash][ext]\" : \"static/media/[name][ext]\",\n },\n },\n ],\n },\n {\n test: /\\.m?js/,\n type: \"javascript/auto\",\n resolve: {\n fullySpecified: false,\n },\n },\n {\n test: /\\.(png|jpe?g|gif|eot|ttf|ico|woff|woff2)$/,\n exclude: /(node_modules)/,\n type: \"asset/resource\",\n },\n {\n test: /\\.(png|jpe?g|gif|svg|eot|ttf|ico|woff|woff2)$/i,\n include: /(node_modules\\/@okta)/,\n type: \"asset/resource\",\n },\n {\n test: /\\.(css|s[ac]ss)$/i,\n use: [\n \"style-loader\",\n \"css-loader\",\n {\n loader: \"postcss-loader\",\n options: {\n postcssOptions: {\n plugins: {\n \"postcss-import\": {},\n \"tailwindcss/nesting\": {},\n tailwindcss: {\n config: path.resolve(appDir, \"tailwind.config.js\"),\n },\n autoprefixer: {},\n },\n },\n },\n },\n ],\n },\n {\n test: /\\.json$/,\n loader: \"json-loader\",\n },\n {\n test: /\\.(j|t)sx?$/,\n exclude: /(vendor|node_modules|dist)/,\n use: {\n loader: \"esbuild-loader\",\n options: {\n jsx: \"automatic\",\n target: \"es6\",\n define: {\n \"process.env.IRIS_APP_SENTRY_DSN\": JSON.stringify(\"\"),\n \"process.env.IRIS_APP_VERSION\": JSON.stringify(\"\"),\n },\n },\n },\n },\n ],\n },\n\n plugins: [\n new webpack.container.ModuleFederationPlugin({\n name: irisAppManifest.moduleFederationName,\n filename: \"remoteEntry.js\",\n library: { type: \"global\", name: irisAppManifest.moduleFederationName },\n remotes: {},\n exposes: await getExposedExtensions({\n nxRootDir,\n manifest: irisAppManifest,\n }),\n shared: await getSharedDependencies({ manifest: irisAppManifest }),\n }),\n\n new TrackunitIrisAppWebpackPlugin({\n nxRootDir: nxRootDir,\n appDir,\n manifest: irisAppManifest,\n }),\n new CopyWebpackPlugin({\n patterns: [\n ...irisAppManifest.extensions\n .filter(extension => serverSideExtensionTypes.includes(extension.type))\n .map(extension => ({\n //globs must use / in path to be valid\n from: extension.sourceRoot.replace(/\\\\/g, \"/\"),\n to: path.join(nxRootDir, \"dist\", relativeAppDir, \"serverside\", extension.id),\n })),\n {\n //globs must use / in path to be valid\n from: path\n .join(path.resolve(relativeAppDir.substring(1), \"assets\"), \"**\", \"(*.png|*.svg|*.jpg|*.jpeg|*.webp|*.md)\")\n .replace(/\\\\/g, \"/\"),\n to: path.resolve(nxRootDir, \"dist\"),\n },\n ...[...iconPaths, ...widgetIconPaths].map(iconPath => ({\n //globs must use / in path to be valid\n from: path.join(iconPath.sourceRoot, iconPath.path).replace(/\\\\/g, \"/\"),\n to: path.join(nxRootDir, \"dist\", relativeAppDir, iconPath.extensionId, iconPath.path),\n })),\n ],\n }),\n BundleAnalyzerPlugin,\n ].filter(Boolean),\n };\n};\n"]}
1
+ {"version":3,"file":"defaultWebpackConfig.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app/src/executors/utils/defaultWebpackConfig.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;qBACF;iBACF;gBACD;oBACE,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,aAAa;iBACtB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,OAAO,EAAE,4BAA4B;oBACrC,GAAG,EAAE;wBACH,MAAM,EAAE,gBAAgB;wBACxB,OAAO,EAAE;4BACP,GAAG,EAAE,WAAW;4BAChB,MAAM,EAAE,KAAK;4BACb,MAAM,EAAE;gCACN,iCAAiC,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;gCACrD,8BAA8B,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;6BACnD;yBACF;qBACF;iBACF;aACF;SACF;QAED,OAAO,EAAE;YACP,IAAI,OAAO,CAAC,SAAS,CAAC,sBAAsB,CAAC;gBAC3C,IAAI,EAAE,eAAe,CAAC,oBAAoB;gBAC1C,QAAQ,EAAE,gBAAgB;gBAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,CAAC,oBAAoB,EAAE;gBACvE,OAAO,EAAE,EAAE;gBACX,OAAO,EAAE,MAAM,IAAA,+CAAoB,EAAC;oBAClC,SAAS;oBACT,QAAQ,EAAE,eAAe;iBAC1B,CAAC;gBACF,MAAM,EAAE,IAAA,gDAAqB,EAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;aAC7D,CAAC;YAEF,IAAI,uDAA6B,CAAC;gBAChC,SAAS,EAAE,SAAS;gBACpB,MAAM;gBACN,QAAQ,EAAE,eAAe;aAC1B,CAAC;YACF,IAAI,iBAAiB,CAAC;gBACpB,QAAQ,EAAE,YAAY;aACvB,CAAC;YACF,oBAAoB;SACrB,CAAC,MAAM,CAAC,OAAO,CAAC;KAClB,CAAC;AACJ,CAAC,CAAC;AAhJW,QAAA,gBAAgB,oBAgJ3B","sourcesContent":["import { IrisAppManifest } from \"@trackunit/iris-app-api\";\nimport {\n getAliasesFromTsConfig,\n getCopyPatterns,\n getExposedExtensions,\n getIrisAppWebpackDevServer,\n getSharedDependencies,\n} from \"@trackunit/iris-app-build-utilities\";\nimport { TrackunitIrisAppWebpackPlugin } from \"@trackunit/iris-app-webpack-plugin\";\nimport * as path from \"path\";\nimport * as webpack from \"webpack\";\nimport \"webpack-dev-server\";\n\ntype WebpackConfiguration = webpack.Configuration;\n\nlet BundleAnalyzerPlugin: webpack.WebpackPluginInstance | null = null;\nif (process.env.BUNDLE_ANALYSE === \"true\") {\n // doing require here to avoid dependency on webpack-bundle-analyzer directly\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const BundleAnalyzerPluginConstructor = require(\"webpack-bundle-analyzer\").BundleAnalyzerPlugin;\n BundleAnalyzerPlugin = new BundleAnalyzerPluginConstructor({ analyzerMode: \"static\" });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-require-imports\nconst CopyWebpackPlugin = require(\"copy-webpack-plugin\");\n\n/**\n * Gets the default webpack config.\n *\n * @param mode mode either \"production\" or \"development\"\n * @param nxRootDir the root of the nx workspace\n * @param appDir the app directory\n * @param irisAppManifest the iris app manifest\n * @returns { Promise<WebpackConfiguration> } the default webpack config\n */\nexport const getDefaultConfig = async (\n mode: \"production\" | \"development\",\n nxRootDir: string,\n appDir: string,\n irisAppManifest: IrisAppManifest\n): Promise<WebpackConfiguration> => {\n const relativeAppDir = appDir.split(nxRootDir)[1] || \"<unknown appdir>\";\n\n const copyPatterns = getCopyPatterns({\n nxRootDir,\n appDir,\n manifest: irisAppManifest,\n mode,\n });\n\n return {\n mode: mode,\n output: {\n publicPath: \"auto\",\n path: path.join(nxRootDir, \"dist\", relativeAppDir),\n },\n\n entry: {},\n devtool: false,\n devServer: await getIrisAppWebpackDevServer(),\n resolve: {\n extensions: [\".tsx\", \".ts\", \".jsx\", \".js\", \".json\"],\n alias: await getAliasesFromTsConfig({ nxRootDir }),\n },\n module: {\n rules: [\n {\n test: /\\.svg$/,\n issuer: /\\.[jt]sx?$/,\n oneOf: [\n {\n resourceQuery: /react/, // if import has ?react in the query so .svg?react\n use: [\n {\n loader: \"@svgr/webpack\",\n options: {\n typescript: true,\n svgo: false,\n titleProp: true,\n ref: true,\n exportType: \"named\",\n namedExport: \"ReactComponent\",\n },\n },\n ],\n },\n {\n type: \"asset/resource\",\n generator: {\n filename: mode === \"production\" ? \"static/media/[hash][ext]\" : \"static/media/[name][ext]\",\n },\n },\n ],\n },\n {\n test: /\\.m?js/,\n type: \"javascript/auto\",\n resolve: {\n fullySpecified: false,\n },\n },\n {\n test: /\\.(png|jpe?g|gif|eot|ttf|ico|woff|woff2)$/,\n exclude: /(node_modules)/,\n type: \"asset/resource\",\n },\n {\n test: /\\.(png|jpe?g|gif|svg|eot|ttf|ico|woff|woff2)$/i,\n include: /(node_modules\\/@okta)/,\n type: \"asset/resource\",\n },\n {\n test: /\\.(css|s[ac]ss)$/i,\n use: [\n \"style-loader\",\n \"css-loader\",\n {\n loader: \"postcss-loader\",\n options: {\n postcssOptions: {\n plugins: {\n \"postcss-import\": {},\n \"tailwindcss/nesting\": {},\n tailwindcss: {\n config: path.resolve(appDir, \"tailwind.config.js\"),\n },\n autoprefixer: {},\n },\n },\n },\n },\n ],\n },\n {\n test: /\\.json$/,\n loader: \"json-loader\",\n },\n {\n test: /\\.(j|t)sx?$/,\n exclude: /(vendor|node_modules|dist)/,\n use: {\n loader: \"esbuild-loader\",\n options: {\n jsx: \"automatic\",\n target: \"es6\",\n define: {\n \"process.env.IRIS_APP_SENTRY_DSN\": JSON.stringify(\"\"),\n \"process.env.IRIS_APP_VERSION\": JSON.stringify(\"\"),\n },\n },\n },\n },\n ],\n },\n\n plugins: [\n new webpack.container.ModuleFederationPlugin({\n name: irisAppManifest.moduleFederationName,\n filename: \"remoteEntry.js\",\n library: { type: \"global\", name: irisAppManifest.moduleFederationName },\n remotes: {},\n exposes: await getExposedExtensions({\n nxRootDir,\n manifest: irisAppManifest,\n }),\n shared: getSharedDependencies({ manifest: irisAppManifest }),\n }),\n\n new TrackunitIrisAppWebpackPlugin({\n nxRootDir: nxRootDir,\n appDir,\n manifest: irisAppManifest,\n }),\n new CopyWebpackPlugin({\n patterns: copyPatterns,\n }),\n BundleAnalyzerPlugin,\n ].filter(Boolean),\n };\n};\n"]}