@trackunit/iris-app-sdk-rspack 1.11.31 → 1.11.33

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,19 @@
1
+ ## 1.11.33 (2026-02-16)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated iris-app-build-utilities to 1.12.33
6
+ - Updated iris-app-webpack-plugin to 1.11.33
7
+ - Updated iris-app-api to 1.14.30
8
+
9
+ ## 1.11.32 (2026-02-13)
10
+
11
+ ### 🧱 Updated Dependencies
12
+
13
+ - Updated iris-app-build-utilities to 1.12.32
14
+ - Updated iris-app-webpack-plugin to 1.11.32
15
+ - Updated iris-app-api to 1.14.29
16
+
1
17
  ## 1.11.31 (2026-02-13)
2
18
 
3
19
  ### 🧱 Updated Dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-sdk-rspack",
3
- "version": "1.11.31",
3
+ "version": "1.11.33",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "executors": "./executors.json",
@@ -14,8 +14,8 @@
14
14
  "rxjs": "7.8.1",
15
15
  "win-ca": "^3.5.1",
16
16
  "webpack-bundle-analyzer": "^4.8.0",
17
- "@trackunit/iris-app-api": "1.14.28",
18
- "@trackunit/iris-app-webpack-plugin": "1.11.31",
17
+ "@trackunit/iris-app-api": "1.14.30",
18
+ "@trackunit/iris-app-webpack-plugin": "1.11.33",
19
19
  "tslib": "^2.6.2",
20
20
  "ts-checker-rspack-plugin": "^1.1.1"
21
21
  },
@@ -145,12 +145,7 @@ const getDefaultConfig = async (mode, nxRootDir, appDir, irisAppManifest, _conte
145
145
  options: {
146
146
  postcssOptions: {
147
147
  plugins: {
148
- "postcss-import": {},
149
- "tailwindcss/nesting": {},
150
- tailwindcss: {
151
- config: path.resolve(appDir, "tailwind.config.js"),
152
- },
153
- autoprefixer: {},
148
+ "@tailwindcss/postcss": {},
154
149
  },
155
150
  },
156
151
  },
@@ -1 +1 @@
1
- {"version":3,"file":"defaultRspackConfig.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/rspack/src/executors/utils/defaultRspackConfig.ts"],"names":[],"mappings":";;;;AACA,6DAAuC;AAEvC,kFAO6C;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,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC;AACzF,CAAC;AAMD;;;;;;;;;;GAUG;AACI,MAAM,gBAAgB,GAAG,KAAK,EACnC,IAAkC,EAClC,SAAiB,EACjB,MAAc,EACd,eAAgC,EAChC,QAAyB,EACzB,UAAmC,EAAE,EACP,EAAE;IAChC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,kBAAkB,CAAC;IAExE,MAAM,YAAY,GAAG,IAAA,0CAAe,EAAC;QACnC,SAAS;QACT,MAAM;QACN,QAAQ,EAAE,eAAe;QACzB,IAAI;KACL,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,EAAE,cAAoC,EAAiC,EAAE;QACnG,OAAO;YACL,GAAG,cAAc;YACjB,IAAI,EAAE,IAAI;YACV,MAAM,EAAE;gBACN,UAAU,EAAE,MAAM;gBAClB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,CAAC;aACnD;YACD,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,EAAE;YACT,O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AM,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 DevServerOptions,\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\nexport interface GetDefaultConfigOptions {\n devServerOptions?: DevServerOptions;\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 * @param _context the executor context\n * @param options additional configuration options\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 options: GetDefaultConfigOptions = {}\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({}, options.devServerOptions),\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"]}
1
+ {"version":3,"file":"defaultRspackConfig.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/rspack/src/executors/utils/defaultRspackConfig.ts"],"names":[],"mappings":";;;;AACA,6DAAuC;AAEvC,kFAO6C;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,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC;AACzF,CAAC;AAMD;;;;;;;;;;GAUG;AACI,MAAM,gBAAgB,GAAG,KAAK,EACnC,IAAkC,EAClC,SAAiB,EACjB,MAAc,EACd,eAAgC,EAChC,QAAyB,EACzB,UAAmC,EAAE,EACP,EAAE;IAChC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,kBAAkB,CAAC;IAExE,MAAM,YAAY,GAAG,IAAA,0CAAe,EAAC;QACnC,SAAS;QACT,MAAM;QACN,QAAQ,EAAE,eAAe;QACzB,IAAI;KACL,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,EAAE,cAAoC,EAAiC,EAAE;QACnG,OAAO;YACL,GAAG,cAAc;YACjB,IAAI,EAAE,IAAI;YACV,MAAM,EAAE;gBACN,UAAU,EAAE,MAAM;gBAClB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,E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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 DevServerOptions,\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\nexport interface GetDefaultConfigOptions {\n devServerOptions?: DevServerOptions;\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 * @param _context the executor context\n * @param options additional configuration options\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 options: GetDefaultConfigOptions = {}\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({}, options.devServerOptions),\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 \"@tailwindcss/postcss\": {},\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"]}