@trackunit/iris-app-sdk-vite 1.4.27 → 1.4.28
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app-sdk-vite",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.28",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"repository": "https://github.com/Trackunit/manager",
|
|
6
6
|
"executors": "./executors.json",
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"rxjs": "7.8.1",
|
|
12
12
|
"win-ca": "^3.5.1",
|
|
13
|
-
"@trackunit/iris-app-build-utilities": "2.4.
|
|
14
|
-
"@trackunit/iris-app-api": "2.4.
|
|
13
|
+
"@trackunit/iris-app-build-utilities": "2.4.27",
|
|
14
|
+
"@trackunit/iris-app-api": "2.4.21",
|
|
15
15
|
"tslib": "^2.6.2",
|
|
16
16
|
"vite": "8.1.5",
|
|
17
|
+
"vite-tsconfig-paths": "^6.1.1",
|
|
17
18
|
"@module-federation/vite": "1.18.1",
|
|
18
|
-
"@nx/vite": "23.1.0",
|
|
19
19
|
"vite-plugin-checker": "^0.12.0",
|
|
20
20
|
"vite-plugin-css-injected-by-js": "5.0.2",
|
|
21
21
|
"rollup-plugin-visualizer": "5.12.0",
|
|
22
22
|
"@tailwindcss/postcss": "^4.1.18",
|
|
23
23
|
"@vitejs/plugin-react-swc": "^4.3.2",
|
|
24
24
|
"@nx/devkit": "23.1.0",
|
|
25
|
-
"@trackunit/iris-app": "2.5.
|
|
25
|
+
"@trackunit/iris-app": "2.5.28",
|
|
26
26
|
"cross-keychain": "^1.1.0",
|
|
27
27
|
"jwt-decode": "^3.1.2"
|
|
28
28
|
},
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getDefaultViteConfig = void 0;
|
|
4
4
|
const svgSpriteInline_1 = require("../../svgSpriteInline");
|
|
5
5
|
const getTrackunitIrisAppVitePlugins_1 = require("./getTrackunitIrisAppVitePlugins");
|
|
6
|
+
const workspaceTsconfigPaths_1 = require("./workspaceTsconfigPaths");
|
|
6
7
|
const VIRTUAL_ENTRY_ID = "virtual:iris-app-entry";
|
|
7
8
|
const RESOLVED_VIRTUAL_ENTRY_ID = `\0${VIRTUAL_ENTRY_ID}`;
|
|
8
9
|
/**
|
|
@@ -54,7 +55,7 @@ const getDefaultViteConfig = async (mode, nxRootDir, appDir, irisAppManifest, co
|
|
|
54
55
|
return {
|
|
55
56
|
root: appDir,
|
|
56
57
|
mode,
|
|
57
|
-
plugins: [(0, svgSpriteInline_1.svgSpriteInline)(), ...irisAppPlugins, virtualEntryPlugin],
|
|
58
|
+
plugins: [(0, workspaceTsconfigPaths_1.workspaceTsconfigPaths)(nxRootDir), (0, svgSpriteInline_1.svgSpriteInline)(), ...irisAppPlugins, virtualEntryPlugin],
|
|
58
59
|
// Optimize dependency pre-bundling
|
|
59
60
|
optimizeDeps: {
|
|
60
61
|
// Force include common dependencies to speed up dev server startup
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getTrackunitIrisAppVitePlugins = getTrackunitIrisAppVitePlugins;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const vite_1 = require("@module-federation/vite");
|
|
6
|
-
const nx_tsconfig_paths_plugin_1 = require("@nx/vite/plugins/nx-tsconfig-paths.plugin");
|
|
7
6
|
const iris_app_build_utilities_1 = require("@trackunit/iris-app-build-utilities");
|
|
8
7
|
const plugin_react_swc_1 = tslib_1.__importDefault(require("@vitejs/plugin-react-swc"));
|
|
9
8
|
const fs = tslib_1.__importStar(require("node:fs"));
|
|
@@ -657,19 +656,17 @@ async function getTrackunitIrisAppVitePlugins(options) {
|
|
|
657
656
|
},
|
|
658
657
|
};
|
|
659
658
|
// Return array of plugins:
|
|
660
|
-
// 1.
|
|
661
|
-
// 2.
|
|
662
|
-
// 3.
|
|
663
|
-
// 4.
|
|
664
|
-
// 5. cssInjectedByJsPlugin - Vite equivalent of rspack's "style-loader"
|
|
659
|
+
// 1. disableHostAutoInitPlugin - intercepts hostAutoInit virtual module (must be before federation)
|
|
660
|
+
// 2. federationPlugin - Module Federation for micro-frontends
|
|
661
|
+
// 3. irisAppPlugin - Iris App specific handling
|
|
662
|
+
// 4. cssInjectedByJsPlugin - Vite equivalent of rspack's "style-loader"
|
|
665
663
|
// Injects CSS via JS as inline <style> tags instead of external CSS files
|
|
666
|
-
//
|
|
664
|
+
// 5. bundleAnalyzerPlugin - optional bundle analysis
|
|
667
665
|
//
|
|
668
666
|
// NOTE: Tailwind CSS is configured via PostCSS (in baseConfig.css.postcss above)
|
|
669
667
|
// NOT using @tailwindcss/vite because it doesn't respect tailwind.config.js content paths
|
|
670
668
|
// PostCSS approach matches Rspack and properly uses Tailwind v4 config files.
|
|
671
669
|
const plugins = [
|
|
672
|
-
(0, nx_tsconfig_paths_plugin_1.nxViteTsPaths)(),
|
|
673
670
|
// React Fast Refresh — enables HMR for React components so file changes
|
|
674
671
|
// are hot-swapped without a full page reload. Safe with Module Federation
|
|
675
672
|
// because Iris apps bundle their own React (iframe isolation).
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createManifestModuleLoader = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const nx_tsconfig_paths_plugin_1 = require("@nx/vite/plugins/nx-tsconfig-paths.plugin");
|
|
6
5
|
const path = tslib_1.__importStar(require("node:path"));
|
|
7
6
|
const vite_1 = require("vite");
|
|
7
|
+
const workspaceTsconfigPaths_1 = require("./workspaceTsconfigPaths");
|
|
8
8
|
/**
|
|
9
9
|
* Packages that ship CommonJS with named exports the module runner cannot
|
|
10
10
|
* statically analyse. Vite externalises dependencies for server environments by
|
|
@@ -100,7 +100,7 @@ const createManifestModuleLoader = async ({ workspaceRoot, }) => {
|
|
|
100
100
|
// invalidate each other's entries.
|
|
101
101
|
cacheDir: path.join(workspaceRoot, "node_modules/.vite-iris-manifest"),
|
|
102
102
|
ssr: { noExternal: [...cjsPackagesRequiringInlining] },
|
|
103
|
-
plugins: [(0,
|
|
103
|
+
plugins: [(0, workspaceTsconfigPaths_1.workspaceTsconfigPaths)(workspaceRoot), commonJsGlobalsPlugin()],
|
|
104
104
|
});
|
|
105
105
|
const runner = (0, vite_1.createServerModuleRunner)(server.environments.ssr);
|
|
106
106
|
return {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workspaceTsconfigPaths = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const vite_tsconfig_paths_1 = tslib_1.__importDefault(require("vite-tsconfig-paths"));
|
|
6
|
+
/**
|
|
7
|
+
* Resolves TypeScript path aliases from the consumer workspace's base config.
|
|
8
|
+
*/
|
|
9
|
+
const workspaceTsconfigPaths = (workspaceRoot) => ({
|
|
10
|
+
...(0, vite_tsconfig_paths_1.default)({
|
|
11
|
+
projects: ["tsconfig.base.json"],
|
|
12
|
+
root: workspaceRoot,
|
|
13
|
+
}),
|
|
14
|
+
// Vite's native resolver ignores importers excluded from their nearest tsconfig.
|
|
15
|
+
// This workspace-level fallback is intentionally not equivalent to the detected community plugin.
|
|
16
|
+
name: "trackunit-workspace-tsconfig-paths",
|
|
17
|
+
});
|
|
18
|
+
exports.workspaceTsconfigPaths = workspaceTsconfigPaths;
|
|
19
|
+
//# sourceMappingURL=workspaceTsconfigPaths.js.map
|