@trackunit/iris-app-sdk-rspack 1.9.23 → 1.10.0

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,12 @@
1
+ ## 1.10.0 (2026-01-12)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated iris-app-build-utilities to 1.10.0
6
+ - Updated iris-app-webpack-plugin to 1.10.0
7
+ - Updated iris-app-api to 1.13.0
8
+ - Updated shared-utils to 1.12.0
9
+
1
10
  ## 1.9.23 (2026-01-09)
2
11
 
3
12
  ### 🧱 Updated Dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-sdk-rspack",
3
- "version": "1.9.23",
3
+ "version": "1.10.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "executors": "./executors.json",
@@ -16,10 +16,10 @@
16
16
  "pacote": "17.0.6",
17
17
  "semver": "7.5.4",
18
18
  "webpack-bundle-analyzer": "^4.8.0",
19
- "@trackunit/iris-app-build-utilities": "1.9.22",
20
- "@trackunit/shared-utils": "1.11.22",
21
- "@trackunit/iris-app-api": "1.12.22",
22
- "@trackunit/iris-app-webpack-plugin": "1.9.22",
19
+ "@trackunit/iris-app-build-utilities": "1.10.0",
20
+ "@trackunit/shared-utils": "1.12.0",
21
+ "@trackunit/iris-app-api": "1.13.0",
22
+ "@trackunit/iris-app-webpack-plugin": "1.10.0",
23
23
  "tslib": "^2.6.2",
24
24
  "ts-checker-rspack-plugin": "^1.1.1"
25
25
  },
@@ -11,7 +11,7 @@ type RspackConfiguration = rspack.Configuration;
11
11
  * @param irisAppManifest the iris app manifest
12
12
  * @returns { Promise<RspackConfiguration> } the default webpack config
13
13
  */
14
- export declare const getDefaultConfig: (mode: "production" | "development", nxRootDir: string, appDir: string, irisAppManifest: IrisAppManifest, context: ExecutorContext) => Promise<RspackConfiguration>;
14
+ export declare const getDefaultConfig: (mode: "production" | "development", nxRootDir: string, appDir: string, irisAppManifest: IrisAppManifest, _context: ExecutorContext) => Promise<RspackConfiguration>;
15
15
  /**
16
16
  * Gets the configuration for internal apps by removing the TypeScript checker plugin.
17
17
  * Internal apps in this repo should use this function to disable the default TypeScript checking
@@ -3,10 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getConfigWithoutTsChecker = exports.getDefaultConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const rspack = tslib_1.__importStar(require("@rspack/core"));
6
- const iris_app_api_1 = require("@trackunit/iris-app-api");
7
6
  const iris_app_build_utilities_1 = require("@trackunit/iris-app-build-utilities");
8
7
  const iris_app_webpack_plugin_1 = require("@trackunit/iris-app-webpack-plugin");
9
- const shared_utils_1 = require("@trackunit/shared-utils");
10
8
  const path = tslib_1.__importStar(require("path"));
11
9
  const ts_checker_rspack_plugin_1 = require("ts-checker-rspack-plugin");
12
10
  let BundleAnalyzerPlugin = null;
@@ -25,72 +23,14 @@ if (process.env.BUNDLE_ANALYSE === "true") {
25
23
  * @param irisAppManifest the iris app manifest
26
24
  * @returns { Promise<RspackConfiguration> } the default webpack config
27
25
  */
28
- const getDefaultConfig = async (mode, nxRootDir, appDir, irisAppManifest, context) => {
26
+ const getDefaultConfig = async (mode, nxRootDir, appDir, irisAppManifest, _context) => {
29
27
  const relativeAppDir = appDir.split(nxRootDir)[1] || "<unknown appdir>";
30
- const iconPaths = irisAppManifest.extensions
31
- .map(extension => {
32
- if (extension.type === "FLEET_EXTENSION" && extension.menuItem.image && (0, iris_app_api_1.isIconByPath)(extension.menuItem.image)) {
33
- return {
34
- extensionId: extension.id,
35
- path: extension.menuItem.image.path,
36
- sourceRoot: extension.sourceRoot,
37
- };
38
- }
39
- return null;
40
- })
41
- .filter(shared_utils_1.truthy);
42
- const widgetIconPaths = irisAppManifest.extensions.flatMap(extension => {
43
- const paths = [];
44
- if (extension.type === "WIDGET_EXTENSION" &&
45
- extension.footer?.poweredByImage &&
46
- (0, iris_app_api_1.isImageByPath)(extension.footer.poweredByImage)) {
47
- paths.push({
48
- extensionId: extension.id,
49
- path: extension.footer.poweredByImage.path,
50
- sourceRoot: extension.sourceRoot,
51
- });
52
- }
53
- if (extension.type === "WIDGET_EXTENSION" && extension.header.image && (0, iris_app_api_1.isIconByPath)(extension.header.image)) {
54
- paths.push({
55
- extensionId: extension.id,
56
- path: extension.header.image.path,
57
- sourceRoot: extension.sourceRoot,
58
- });
59
- }
60
- return paths;
28
+ const copyPatterns = (0, iris_app_build_utilities_1.getCopyPatterns)({
29
+ nxRootDir,
30
+ appDir,
31
+ manifest: irisAppManifest,
32
+ mode,
61
33
  });
62
- const copyPatterns = [
63
- ...irisAppManifest.extensions
64
- .filter(extension => mode === "production" && iris_app_api_1.serverSideExtensionTypes.includes(extension.type))
65
- .flatMap(extension => {
66
- const patterns = [
67
- {
68
- //globs must use / in path to be valid
69
- from: path.resolve(nxRootDir, extension.sourceRoot.replace(/\\/g, "/")),
70
- to: path.join(nxRootDir, "dist", relativeAppDir, "serverside", extension.id),
71
- },
72
- ];
73
- // Check if extension has dependencyDefinitionFile and add it to patterns if it exists
74
- if ("dependencyDefinitionFile" in extension && extension.dependencyDefinitionFile) {
75
- patterns.push({
76
- //globs must use / in path to be valid
77
- from: path.resolve(nxRootDir, extension.dependencyDefinitionFile.replace(/\\/g, "/")),
78
- to: path.join(nxRootDir, "dist", relativeAppDir, "serverside", extension.id),
79
- });
80
- }
81
- return patterns;
82
- }),
83
- {
84
- //globs must use / in path to be valid
85
- from: path.join(appDir, "assets/").replace(/\\/g, "/"),
86
- to: path.join(nxRootDir, "dist", relativeAppDir, "assets"),
87
- },
88
- ...[...iconPaths, ...widgetIconPaths].map(iconPath => ({
89
- //globs must use / in path to be valid
90
- from: path.join(nxRootDir, iconPath.sourceRoot, iconPath.path).replace(/\\/g, "/"),
91
- to: path.join(nxRootDir, "dist", relativeAppDir, iconPath.extensionId, iconPath.path),
92
- })),
93
- ];
94
34
  const combinedConfig = async (incomingConfig) => {
95
35
  return {
96
36
  ...incomingConfig,
@@ -227,7 +167,7 @@ const getDefaultConfig = async (mode, nxRootDir, appDir, irisAppManifest, contex
227
167
  nxRootDir,
228
168
  manifest: irisAppManifest,
229
169
  }),
230
- shared: await (0, iris_app_build_utilities_1.getSharedDependencies)({ manifest: irisAppManifest }),
170
+ shared: (0, iris_app_build_utilities_1.getSharedDependencies)({ manifest: irisAppManifest }),
231
171
  }),
232
172
  new iris_app_webpack_plugin_1.TrackunitIrisAppWebpackPlugin({
233
173
  nxRootDir: nxRootDir,
@@ -1 +1 @@
1
- {"version":3,"file":"defaultRspackConfig.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/rspack/src/executors/utils/defaultRspackConfig.ts"],"names":[],"mappings":";;;;AACA,6DAAuC;AACvC,0DAAiH;AACjH,kFAK6C;AAC7C,gFAAmF;AACnF,0DAAiD;AACjD,mDAA6B;AAC7B,uEAAiE;AAIjE,IAAI,oBAAoB,GAAwC,IAAI,CAAC;AACrE,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;;;;;;;;GAQG;AACI,MAAM,gBAAgB,GAAG,KAAK,EACnC,IAAkC,EAClC,SAAiB,EACjB,MAAc,EACd,eAAgC,EAChC,OAAwB,EACM,EAAE;IAChC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,kBAAkB,CAAC;IACxE,MAAM,SAAS,GAAG,eAAe,CAAC,UAAU;SACzC,GAAG,CAAC,SAAS,C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BACrD,8BAA8B,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;iBACnD,CAAC;gBACF,IAAI,MAAM,CAAC,gBAAgB,CAAC;oBAC1B,QAAQ,EAAE,YAAY;iBACvB,CAAC;gBACF,IAAI,gDAAqB,CAAC;oBACxB,KAAK,EAAE,IAAI;oBACX,UAAU,EAAE;wBACV,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC;qBAC/C;iBACF,CAAC;gBACF,oBAAoB;aACrB,CAAC,MAAM,CAAC,OAAO,CAAC;SAClB,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC,CAAC;AAlPW,QAAA,gBAAgB,oBAkP3B;AAEF;;;;;;;GAOG;AACI,MAAM,yBAAyB,GAAG,CAAC,aAAkC,EAAuB,EAAE;IACnG,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC;IAEpD,OAAO;QACL,GAAG,aAAa;QAChB,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YACvC,MAAM,UAAU,GAAG,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC;YAC5C,OAAO,UAAU,KAAK,uBAAuB,CAAC;QAChD,CAAC,CAAC;KACH,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,yBAAyB,6BAUpC","sourcesContent":["import { ExecutorContext } from \"@nx/devkit\";\nimport * as rspack from \"@rspack/core\";\nimport { IrisAppManifest, isIconByPath, isImageByPath, serverSideExtensionTypes } from \"@trackunit/iris-app-api\";\nimport {\n getAliasesFromTsConfig,\n getExposedExtensions,\n getIrisAppRspackDevServer,\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 { TsCheckerRspackPlugin } from \"ts-checker-rspack-plugin\";\n\ntype RspackConfiguration = rspack.Configuration;\n\nlet BundleAnalyzerPlugin: rspack.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/**\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<RspackConfiguration> } the default webpack config\n */\nexport const getDefaultConfig = async (\n mode: \"production\" | \"development\",\n nxRootDir: string,\n appDir: string,\n irisAppManifest: IrisAppManifest,\n context: ExecutorContext\n): Promise<RspackConfiguration> => {\n const relativeAppDir = appDir.split(nxRootDir)[1] || \"<unknown appdir>\";\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 const widgetIconPaths = irisAppManifest.extensions.flatMap(extension => {\n const paths = [];\n if (\n extension.type === \"WIDGET_EXTENSION\" &&\n extension.footer?.poweredByImage &&\n isImageByPath(extension.footer.poweredByImage)\n ) {\n paths.push({\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 paths.push({\n extensionId: extension.id,\n path: extension.header.image.path,\n sourceRoot: extension.sourceRoot,\n });\n }\n\n return paths;\n });\n\n const copyPatterns = [\n ...irisAppManifest.extensions\n .filter(extension => mode === \"production\" && serverSideExtensionTypes.includes(extension.type))\n .flatMap(extension => {\n const patterns: Array<{ from: string; to: string }> = [\n {\n //globs must use / in path to be valid\n from: path.resolve(nxRootDir, extension.sourceRoot.replace(/\\\\/g, \"/\")),\n to: path.join(nxRootDir, \"dist\", relativeAppDir, \"serverside\", extension.id),\n },\n ];\n\n // Check if extension has dependencyDefinitionFile and add it to patterns if it exists\n if (\"dependencyDefinitionFile\" in extension && extension.dependencyDefinitionFile) {\n patterns.push({\n //globs must use / in path to be valid\n from: path.resolve(nxRootDir, extension.dependencyDefinitionFile.replace(/\\\\/g, \"/\")),\n to: path.join(nxRootDir, \"dist\", relativeAppDir, \"serverside\", extension.id),\n });\n }\n\n return patterns;\n }),\n {\n //globs must use / in path to be valid\n from: path.join(appDir, \"assets/\").replace(/\\\\/g, \"/\"),\n to: path.join(nxRootDir, \"dist\", relativeAppDir, \"assets\"),\n },\n ...[...iconPaths, ...widgetIconPaths].map(iconPath => ({\n //globs must use / in path to be valid\n from: path.join(nxRootDir, iconPath.sourceRoot, iconPath.path).replace(/\\\\/g, \"/\"),\n to: path.join(nxRootDir, \"dist\", relativeAppDir, iconPath.extensionId, iconPath.path),\n })),\n ];\n const combinedConfig = async (incomingConfig: rspack.Configuration): Promise<rspack.Configuration> => {\n return {\n ...incomingConfig,\n mode: mode,\n output: {\n publicPath: \"auto\",\n path: path.join(nxRootDir, \"dist\", relativeAppDir),\n },\n target: \"web\",\n entry: {},\n devtool: false,\n devServer: await getIrisAppRspackDevServer(),\n resolve: {\n extensions: [\".tsx\", \".ts\", \".jsx\", \".js\", \".json\"],\n alias: await getAliasesFromTsConfig({ nxRootDir }),\n },\n optimization:\n mode === \"production\"\n ? incomingConfig.optimization\n : {\n ...incomingConfig.optimization,\n splitChunks: {\n cacheGroups: {\n translations: {\n test: /[\\\\/]locales[\\\\/](.*?)[\\\\/]translation\\.json$/,\n name(module) {\n // Extract the language code from the path\n const match = module.identifier().match(/[\\\\/]locales[\\\\/](.*?)[\\\\/]translation\\.json$/);\n const language = match ? match[1] : \"unknown\";\n return `translations-${language}`;\n },\n chunks: \"all\",\n enforce: true,\n priority: 10,\n },\n },\n },\n },\n module: {\n rules: [\n {\n test: /\\.(jsx?|tsx?)$/,\n exclude: /(vendor|node_modules|dist)/,\n loader: \"builtin:swc-loader\",\n options: {\n jsc: {\n parser: {\n syntax: \"typescript\",\n jsx: true,\n },\n transform: {\n react: {\n runtime: \"automatic\",\n },\n },\n },\n },\n },\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\",\n generator: {\n filename: mode === \"production\" ? \"static/media/[hash][ext]\" : \"static/media/[name][ext]\",\n },\n },\n ],\n },\n {\n test: /\\.ico|.png|.jpe?g|.gif|.eot|.ttf|.woff|.woff2$/,\n type: \"asset\",\n },\n {\n test: /\\.(js|mjs)$/,\n include: [\n /node_modules\\/@apollo\\/client/,\n /node_modules\\/framer-motion/,\n /node_modules\\/uuid/,\n /node_modules\\/html-parse-stringify/,\n ],\n type: \"javascript/auto\",\n resolve: {\n fullySpecified: false,\n },\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 },\n plugins: [\n new rspack.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 rspack.DefinePlugin({\n \"process.env.IRIS_APP_SENTRY_DSN\": JSON.stringify(\"\"),\n \"process.env.IRIS_APP_VERSION\": JSON.stringify(\"\"),\n }),\n new rspack.CopyRspackPlugin({\n patterns: copyPatterns,\n }),\n new TsCheckerRspackPlugin({\n async: true,\n typescript: {\n configFile: path.join(appDir, \"tsconfig.json\"),\n },\n }),\n BundleAnalyzerPlugin,\n ].filter(Boolean),\n };\n };\n\n return await combinedConfig({});\n};\n\n/**\n * Gets the configuration for internal apps by removing the TypeScript checker plugin.\n * Internal apps in this repo should use this function to disable the default TypeScript checking\n * that is included in the base rspack configuration.\n *\n * @param configuration - The rspack configuration\n * @returns { RspackConfiguration } The configuration without TsCheckerRspackPlugin\n */\nexport const getConfigWithoutTsChecker = (configuration: RspackConfiguration): RspackConfiguration => {\n const existingPlugins = configuration.plugins || [];\n\n return {\n ...configuration,\n plugins: existingPlugins.filter(plugin => {\n const pluginName = plugin?.constructor.name;\n return pluginName !== \"TsCheckerRspackPlugin\";\n }),\n };\n};\n"]}
1
+ {"version":3,"file":"defaultRspackConfig.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/rspack/src/executors/utils/defaultRspackConfig.ts"],"names":[],"mappings":";;;;AACA,6DAAuC;AAEvC,kFAM6C;AAC7C,gFAAmF;AACnF,mDAA6B;AAC7B,uEAAiE;AAIjE,IAAI,oBAAoB,GAAwC,IAAI,CAAC;AACrE,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,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AAI,CAAC,SAAS,CAAC,EAAE,CAAC;iBACnD,CAAC;gBACF,IAAI,MAAM,CAAC,gBAAgB,CAAC;oBAC1B,QAAQ,EAAE,YAAY;iBACvB,CAAC;gBACF,IAAI,gDAAqB,CAAC;oBACxB,KAAK,EAAE,IAAI;oBACX,UAAU,EAAE;wBACV,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC;qBAC/C;iBACF,CAAC;gBACF,oBAAoB;aACrB,CAAC,MAAM,CAAC,OAAO,CAAC;SAClB,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC,CAAC;AApLW,QAAA,gBAAgB,oBAoL3B;AAEF;;;;;;;GAOG;AACI,MAAM,yBAAyB,GAAG,CAAC,aAAkC,EAAuB,EAAE;IACnG,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC;IAEpD,OAAO;QACL,GAAG,aAAa;QAChB,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YACvC,MAAM,UAAU,GAAG,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC;YAC5C,OAAO,UAAU,KAAK,uBAAuB,CAAC;QAChD,CAAC,CAAC;KACH,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,yBAAyB,6BAUpC","sourcesContent":["import { ExecutorContext } from \"@nx/devkit\";\nimport * as rspack from \"@rspack/core\";\nimport { IrisAppManifest } from \"@trackunit/iris-app-api\";\nimport {\n getAliasesFromTsConfig,\n getCopyPatterns,\n getExposedExtensions,\n getIrisAppRspackDevServer,\n getSharedDependencies,\n} from \"@trackunit/iris-app-build-utilities\";\nimport { TrackunitIrisAppWebpackPlugin } from \"@trackunit/iris-app-webpack-plugin\";\nimport * as path from \"path\";\nimport { TsCheckerRspackPlugin } from \"ts-checker-rspack-plugin\";\n\ntype RspackConfiguration = rspack.Configuration;\n\nlet BundleAnalyzerPlugin: rspack.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/**\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<RspackConfiguration> } the default webpack config\n */\nexport const getDefaultConfig = async (\n mode: \"production\" | \"development\",\n nxRootDir: string,\n appDir: string,\n irisAppManifest: IrisAppManifest,\n _context: ExecutorContext\n): Promise<RspackConfiguration> => {\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 const combinedConfig = async (incomingConfig: rspack.Configuration): Promise<rspack.Configuration> => {\n return {\n ...incomingConfig,\n mode: mode,\n output: {\n publicPath: \"auto\",\n path: path.join(nxRootDir, \"dist\", relativeAppDir),\n },\n target: \"web\",\n entry: {},\n devtool: false,\n devServer: await getIrisAppRspackDevServer(),\n resolve: {\n extensions: [\".tsx\", \".ts\", \".jsx\", \".js\", \".json\"],\n alias: await getAliasesFromTsConfig({ nxRootDir }),\n },\n optimization:\n mode === \"production\"\n ? incomingConfig.optimization\n : {\n ...incomingConfig.optimization,\n splitChunks: {\n cacheGroups: {\n translations: {\n test: /[\\\\/]locales[\\\\/](.*?)[\\\\/]translation\\.json$/,\n name(module) {\n // Extract the language code from the path\n const match = module.identifier().match(/[\\\\/]locales[\\\\/](.*?)[\\\\/]translation\\.json$/);\n const language = match ? match[1] : \"unknown\";\n return `translations-${language}`;\n },\n chunks: \"all\",\n enforce: true,\n priority: 10,\n },\n },\n },\n },\n module: {\n rules: [\n {\n test: /\\.(jsx?|tsx?)$/,\n exclude: /(vendor|node_modules|dist)/,\n loader: \"builtin:swc-loader\",\n options: {\n jsc: {\n parser: {\n syntax: \"typescript\",\n jsx: true,\n },\n transform: {\n react: {\n runtime: \"automatic\",\n },\n },\n },\n },\n },\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\",\n generator: {\n filename: mode === \"production\" ? \"static/media/[hash][ext]\" : \"static/media/[name][ext]\",\n },\n },\n ],\n },\n {\n test: /\\.ico|.png|.jpe?g|.gif|.eot|.ttf|.woff|.woff2$/,\n type: \"asset\",\n },\n {\n test: /\\.(js|mjs)$/,\n include: [\n /node_modules\\/@apollo\\/client/,\n /node_modules\\/framer-motion/,\n /node_modules\\/uuid/,\n /node_modules\\/html-parse-stringify/,\n ],\n type: \"javascript/auto\",\n resolve: {\n fullySpecified: false,\n },\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 },\n plugins: [\n new rspack.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 rspack.DefinePlugin({\n \"process.env.IRIS_APP_SENTRY_DSN\": JSON.stringify(\"\"),\n \"process.env.IRIS_APP_VERSION\": JSON.stringify(\"\"),\n }),\n new rspack.CopyRspackPlugin({\n patterns: copyPatterns,\n }),\n new TsCheckerRspackPlugin({\n async: true,\n typescript: {\n configFile: path.join(appDir, \"tsconfig.json\"),\n },\n }),\n BundleAnalyzerPlugin,\n ].filter(Boolean),\n };\n };\n\n return await combinedConfig({});\n};\n\n/**\n * Gets the configuration for internal apps by removing the TypeScript checker plugin.\n * Internal apps in this repo should use this function to disable the default TypeScript checking\n * that is included in the base rspack configuration.\n *\n * @param configuration - The rspack configuration\n * @returns { RspackConfiguration } The configuration without TsCheckerRspackPlugin\n */\nexport const getConfigWithoutTsChecker = (configuration: RspackConfiguration): RspackConfiguration => {\n const existingPlugins = configuration.plugins || [];\n\n return {\n ...configuration,\n plugins: existingPlugins.filter(plugin => {\n const pluginName = plugin?.constructor.name;\n return pluginName !== \"TsCheckerRspackPlugin\";\n }),\n };\n};\n"]}