@trackunit/iris-app-sdk-webpack 1.6.6 → 1.6.10
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 +41 -0
- package/package.json +5 -5
- package/src/executors/build/webpack.d.ts +1 -1
- package/src/executors/build/webpack.js +1 -1
- package/src/executors/build/webpack.js.map +1 -1
- package/src/executors/serve/webpackDevServer.d.ts +1 -1
- package/src/executors/serve/webpackDevServer.js +1 -1
- package/src/executors/serve/webpackDevServer.js.map +1 -1
- package/src/executors/utils/defaultWebpackConfig.d.ts +4 -2
- package/src/executors/utils/defaultWebpackConfig.js +1 -1
- package/src/executors/utils/defaultWebpackConfig.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
+
## 1.6.10 (2025-08-25)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated iris-app-build-utilities to 1.6.9
|
|
6
|
+
- Updated iris-app-webpack-plugin to 1.6.9
|
|
7
|
+
- Updated iris-app-api to 1.6.9
|
|
8
|
+
- Updated shared-utils to 1.8.10
|
|
9
|
+
|
|
10
|
+
## 1.6.9 (2025-08-25)
|
|
11
|
+
|
|
12
|
+
### 🩹 Fixes
|
|
13
|
+
|
|
14
|
+
- adjust types and align JSDoc comments across libraries ([#19256](https://github.com/Trackunit/manager/pull/19256))
|
|
15
|
+
|
|
16
|
+
### 🧱 Updated Dependencies
|
|
17
|
+
|
|
18
|
+
- Updated iris-app-build-utilities to 1.6.8
|
|
19
|
+
- Updated iris-app-webpack-plugin to 1.6.8
|
|
20
|
+
- Updated iris-app-api to 1.6.8
|
|
21
|
+
- Updated shared-utils to 1.8.9
|
|
22
|
+
|
|
23
|
+
### ❤️ Thank You
|
|
24
|
+
|
|
25
|
+
- Brian Christensen @bchTrackunit
|
|
26
|
+
|
|
27
|
+
## 1.6.8 (2025-08-25)
|
|
28
|
+
|
|
29
|
+
### 🧱 Updated Dependencies
|
|
30
|
+
|
|
31
|
+
- Updated iris-app-build-utilities to 1.6.7
|
|
32
|
+
- Updated iris-app-webpack-plugin to 1.6.7
|
|
33
|
+
- Updated iris-app-api to 1.6.7
|
|
34
|
+
- Updated shared-utils to 1.8.8
|
|
35
|
+
|
|
36
|
+
## 1.6.7 (2025-08-25)
|
|
37
|
+
|
|
38
|
+
### 🧱 Updated Dependencies
|
|
39
|
+
|
|
40
|
+
- Updated shared-utils to 1.8.7
|
|
41
|
+
|
|
1
42
|
## 1.6.6 (2025-08-21)
|
|
2
43
|
|
|
3
44
|
### 🧱 Updated Dependencies
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app-sdk-webpack",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.10",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"repository": "https://github.com/Trackunit/manager",
|
|
6
6
|
"executors": "./executors.json",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"semver": "7.5.4",
|
|
18
18
|
"copy-webpack-plugin": "11.0.0",
|
|
19
19
|
"webpack-bundle-analyzer": "^4.8.0",
|
|
20
|
-
"@trackunit/iris-app-build-utilities": "1.6.
|
|
21
|
-
"@trackunit/shared-utils": "1.8.
|
|
22
|
-
"@trackunit/iris-app-api": "1.6.
|
|
23
|
-
"@trackunit/iris-app-webpack-plugin": "1.6.
|
|
20
|
+
"@trackunit/iris-app-build-utilities": "1.6.9",
|
|
21
|
+
"@trackunit/shared-utils": "1.8.10",
|
|
22
|
+
"@trackunit/iris-app-api": "1.6.9",
|
|
23
|
+
"@trackunit/iris-app-webpack-plugin": "1.6.9",
|
|
24
24
|
"tslib": "^2.6.2"
|
|
25
25
|
},
|
|
26
26
|
"types": "./src/index.d.ts",
|
|
@@ -3,7 +3,7 @@ import webpack = require("webpack");
|
|
|
3
3
|
/**
|
|
4
4
|
* Run webpack with the given configuration.
|
|
5
5
|
*
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {WebpackConfig} config the webpack configuration
|
|
7
7
|
* @returns {*} {Observable<any>}
|
|
8
8
|
*/
|
|
9
9
|
export declare function doRunWebpack(config: webpack.Configuration): Observable<webpack.Stats>;
|
|
@@ -6,7 +6,7 @@ const webpack = require("webpack");
|
|
|
6
6
|
/**
|
|
7
7
|
* Run webpack with the given configuration.
|
|
8
8
|
*
|
|
9
|
-
* @param {
|
|
9
|
+
* @param {WebpackConfig} config the webpack configuration
|
|
10
10
|
* @returns {*} {Observable<any>}
|
|
11
11
|
*/
|
|
12
12
|
function doRunWebpack(config) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/webpack/src/executors/build/webpack.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"webpack.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/webpack/src/executors/build/webpack.ts"],"names":[],"mappings":";;AAUA,oCA4BC;AAtCD,+BAAkC;AAClC,mCAAoC;AAGpC;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,MAA6B;IACxD,OAAO,IAAI,iBAAU,CAAC,UAAU,CAAC,EAAE;QACjC,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,GAAG,MAAM,CAAC;QAC9C,MAAM,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAElD,MAAM,QAAQ,GAAG,CAAC,GAA6B,EAAE,KAAgC,EAAE,EAAE;YACnF,IAAI,GAAG,EAAE,CAAC;gBACR,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACxB,CAAC;YACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,CAAC;QAEF,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACjB,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC;YAC/C,MAAM,QAAQ,GAAG,eAAe,CAAC,KAAK,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;YAC/D,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,GAA6B,EAAE,KAAgC,EAAE,EAAE;gBAC7F,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;gBACrB,eAAe,CAAC,KAAK,CAAC,CAAC,QAAkC,EAAE,EAAE;oBAC3D,IAAI,QAAQ,EAAE,CAAC;wBACb,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBAC7B,CAAC;oBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxB,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { Observable } from \"rxjs\";\nimport webpack = require(\"webpack\");\n\ntype WebpackConfig = webpack.Configuration;\n/**\n * Run webpack with the given configuration.\n *\n * @param {WebpackConfig} config the webpack configuration\n * @returns {*} {Observable<any>}\n */\nexport function doRunWebpack(config: webpack.Configuration): Observable<webpack.Stats> {\n return new Observable(subscriber => {\n const { watch, ...normalizedConfig } = config;\n const webpackCompiler = webpack(normalizedConfig);\n\n const callback = (err: Error | null | undefined, stats: webpack.Stats | undefined) => {\n if (err) {\n subscriber.error(err);\n }\n subscriber.next(stats);\n };\n\n if (config.watch) {\n const watchOptions = config.watchOptions || {};\n const watching = webpackCompiler.watch(watchOptions, callback);\n return () => watching.close(() => subscriber.complete());\n } else {\n return webpackCompiler.run((err: Error | null | undefined, stats: webpack.Stats | undefined) => {\n callback(err, stats);\n webpackCompiler.close((closeErr: Error | null | undefined) => {\n if (closeErr) {\n subscriber.error(closeErr);\n }\n subscriber.complete();\n });\n });\n }\n });\n}\n"]}
|
|
@@ -4,7 +4,7 @@ import webpack = require("webpack");
|
|
|
4
4
|
* Run webpack with the given configuration.
|
|
5
5
|
*
|
|
6
6
|
* @param config the input webpack configuration
|
|
7
|
-
* @returns { Observable<{ stats:
|
|
7
|
+
* @returns { Observable<{ stats:WebpackStats; baseUrl: string }> } the observable of webpack stats and base url
|
|
8
8
|
*/
|
|
9
9
|
export declare function doRunWebpackDevServer(config: webpack.Configuration): Observable<{
|
|
10
10
|
stats: webpack.Stats;
|
|
@@ -8,7 +8,7 @@ const webpack = require("webpack");
|
|
|
8
8
|
* Run webpack with the given configuration.
|
|
9
9
|
*
|
|
10
10
|
* @param config the input webpack configuration
|
|
11
|
-
* @returns { Observable<{ stats:
|
|
11
|
+
* @returns { Observable<{ stats:WebpackStats; baseUrl: string }> } the observable of webpack stats and base url
|
|
12
12
|
*/
|
|
13
13
|
function doRunWebpackDevServer(config) {
|
|
14
14
|
return new rxjs_1.Observable(subscriber => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpackDevServer.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/webpack/src/executors/serve/webpackDevServer.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"webpackDevServer.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/webpack/src/executors/serve/webpackDevServer.ts"],"names":[],"mappings":";;AAWA,sDAiCC;AA5CD,+BAAkC;AAClC,uDAAwD;AACxD,mCAAoC;AAGpC;;;;;GAKG;AACH,SAAgB,qBAAqB,CACnC,MAA6B;IAE7B,OAAO,IAAI,iBAAU,CAAC,UAAU,CAAC,EAAE;QACjC,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEhD,IAAI,OAAe,CAAC;QAEpB,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE;YACtD,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;QAE/C,MAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC;QAErD,eAAe,CAAC,WAAW,GAAG,UAAU,MAAwB;YAC9D,IAAI,gBAAgB,EAAE,CAAC;gBACrB,gBAAgB,CAAC,MAAM,CAAC,CAAC;YAC3B,CAAC;YAED,MAAM,gBAAgB,GAAmC,MAAM,CAAC,OAAO,CAAC;YAExE,OAAO,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,IACxF,MAAM,CAAC,OAAO,CAAC,IACjB,GAAG,gBAAgB,CAAC,aAAa,EAAE,UAAU,EAAE,CAAC;QAClD,CAAC,CAAC;QAEF,MAAM,aAAa,GAAG,IAAI,gBAAgB,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;QAE7E,aAAa,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QACnE,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { Observable } from \"rxjs\";\nimport WebpackDevServer = require(\"webpack-dev-server\");\nimport webpack = require(\"webpack\");\n\ntype WebpackStats = webpack.Stats;\n/**\n * Run webpack with the given configuration.\n *\n * @param config the input webpack configuration\n * @returns { Observable<{ stats:WebpackStats; baseUrl: string }> } the observable of webpack stats and base url\n */\nexport function doRunWebpackDevServer(\n config: webpack.Configuration\n): Observable<{ stats: webpack.Stats; baseUrl: string }> {\n return new Observable(subscriber => {\n const webpackCompiler = webpack.webpack(config);\n\n let baseUrl: string;\n\n webpackCompiler.hooks.done.tap(\"build-webpack\", stats => {\n subscriber.next({ stats, baseUrl });\n });\n\n const devServerConfig = config.devServer || {};\n\n const originalOnListen = devServerConfig.onListening;\n\n devServerConfig.onListening = function (server: WebpackDevServer) {\n if (originalOnListen) {\n originalOnListen(server);\n }\n\n const devServerOptions: WebpackDevServer.Configuration = server.options;\n\n baseUrl = `${server.options.server === \"https\" ? \"https\" : \"http\"}://${server.options.host}:${\n server.options.port\n }${devServerOptions.devMiddleware?.publicPath}`;\n };\n\n const webpackServer = new WebpackDevServer(devServerConfig, webpackCompiler);\n\n webpackServer.start().catch((err: Error) => subscriber.error(err));\n return () => webpackServer.stop();\n });\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IrisAppManifest } from "@trackunit/iris-app-api";
|
|
2
2
|
import * as webpack from "webpack";
|
|
3
3
|
import "webpack-dev-server";
|
|
4
|
+
type WebpackConfiguration = webpack.Configuration;
|
|
4
5
|
/**
|
|
5
6
|
* Gets the default webpack config.
|
|
6
7
|
*
|
|
@@ -8,6 +9,7 @@ import "webpack-dev-server";
|
|
|
8
9
|
* @param nxRootDir the root of the nx workspace
|
|
9
10
|
* @param appDir the app directory
|
|
10
11
|
* @param irisAppManifest the iris app manifest
|
|
11
|
-
* @returns { Promise<
|
|
12
|
+
* @returns { Promise<WebpackConfiguration> } the default webpack config
|
|
12
13
|
*/
|
|
13
|
-
export declare const getDefaultConfig: (mode: "production" | "development", nxRootDir: string, appDir: string, irisAppManifest: IrisAppManifest) => Promise<
|
|
14
|
+
export declare const getDefaultConfig: (mode: "production" | "development", nxRootDir: string, appDir: string, irisAppManifest: IrisAppManifest) => Promise<WebpackConfiguration>;
|
|
15
|
+
export {};
|
|
@@ -25,7 +25,7 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
|
|
|
25
25
|
* @param nxRootDir the root of the nx workspace
|
|
26
26
|
* @param appDir the app directory
|
|
27
27
|
* @param irisAppManifest the iris app manifest
|
|
28
|
-
* @returns { Promise<
|
|
28
|
+
* @returns { Promise<WebpackConfiguration> } the default webpack config
|
|
29
29
|
*/
|
|
30
30
|
const getDefaultConfig = async (mode, nxRootDir, appDir, irisAppManifest) => {
|
|
31
31
|
const relativeAppDir = appDir.split(nxRootDir)[1] || "<unknown appdir>";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultWebpackConfig.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/webpack/src/executors/utils/defaultWebpackConfig.ts"],"names":[],"mappings":";;;;AAAA,0DAAkG;AAClG,kFAK6C;AAC7C,gFAAmF;AACnF,0DAAiD;AACjD,mDAA6B;AAC7B,yDAAmC;AACnC,8BAA4B;AAE5B,IAAI,oBAAoB,GAAyC,IAAI,CAAC;AACtE,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;IAC1C,6EAA6E;IAC7E,qGAAqG;IACrG,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,qGAAqG;AACrG,MAAM,iBAAiB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEzD;;;;;;;;GAQG;AACI,MAAM,gBAAgB,GAAG,KAAK,EACnC,IAAkC,EAClC,SAAiB,EACjB,MAAc,EACd,eAAgC,EACA,EAAE;IAClC,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,KA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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;AA1KW,QAAA,gBAAgB,oBA0K3B","sourcesContent":["import { IrisAppManifest, isIconByPath, 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\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-var-requires, @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-var-requires, @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<webpack.Configuration> } the default webpack config\n */\nexport const getDefaultConfig = async (\n mode: \"production\" | \"development\",\n nxRootDir: string,\n appDir: string,\n irisAppManifest: IrisAppManifest\n): Promise<webpack.Configuration> => {\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 const widgetIconPaths = irisAppManifest.extensions\n .map(extension => {\n if (\n extension.type === \"WIDGET_EXTENSION\" &&\n extension.footer?.poweredByImage &&\n isIconByPath(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 return null;\n })\n .filter(truthy);\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 use: [\"@svgr/webpack\"],\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/webpack/src/executors/utils/defaultWebpackConfig.ts"],"names":[],"mappings":";;;;AAAA,0DAAkG;AAClG,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,qGAAqG;IACrG,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,qGA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,oBAAoB;SACrB,CAAC,MAAM,CAAC,OAAO,CAAC;KAClB,CAAC;AACJ,CAAC,CAAC;AA1KW,QAAA,gBAAgB,oBA0K3B","sourcesContent":["import { IrisAppManifest, isIconByPath, 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-var-requires, @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-var-requires, @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 const widgetIconPaths = irisAppManifest.extensions\n .map(extension => {\n if (\n extension.type === \"WIDGET_EXTENSION\" &&\n extension.footer?.poweredByImage &&\n isIconByPath(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 return null;\n })\n .filter(truthy);\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 use: [\"@svgr/webpack\"],\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"]}
|