@hitachivantara/app-shell-vite-plugin 1.9.5 → 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/dist/vite-plugin.d.ts +7 -0
- package/dist/vite-plugin.js +3 -2
- package/package.json +2 -2
package/dist/vite-plugin.d.ts
CHANGED
|
@@ -90,6 +90,13 @@ export interface AppShellVitePluginOptions {
|
|
|
90
90
|
*
|
|
91
91
|
*/
|
|
92
92
|
modules?: string[];
|
|
93
|
+
/**
|
|
94
|
+
* If true, the keys of the `apps` property in the configuration file will be used as-is in the importmap,
|
|
95
|
+
* without enforcing a trailing slash. If false, a trailing slash will be appended to each key.
|
|
96
|
+
*
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
99
|
+
disableAppsKeyNormalization?: boolean;
|
|
93
100
|
}
|
|
94
101
|
/**
|
|
95
102
|
* Vite plugin to support App Shell apps setup
|
package/dist/vite-plugin.js
CHANGED
|
@@ -25,7 +25,7 @@ const ViteBuildMode = {
|
|
|
25
25
|
* @param env Environment variable
|
|
26
26
|
*/
|
|
27
27
|
export function HvAppShellVitePlugin(opts = {}, env = {}) {
|
|
28
|
-
const { root = process.cwd(), mode = ViteBuildMode.PRODUCTION, externalImportMap = false, viewsFolder = "src/pages", autoViewsAndRoutes = false, autoMenu = false, inlineConfig = opts.generateEmptyShell ?? false, generateEmptyShell = false, modules = [], } = opts;
|
|
28
|
+
const { root = process.cwd(), mode = ViteBuildMode.PRODUCTION, externalImportMap = false, viewsFolder = "src/pages", autoViewsAndRoutes = false, autoMenu = false, inlineConfig = opts.generateEmptyShell ?? false, generateEmptyShell = false, modules = [], disableAppsKeyNormalization = false, } = opts;
|
|
29
29
|
const globalEnv = loadEnv(mode, process.cwd(), "");
|
|
30
30
|
const { type = globalEnv.CI ? "bundle" : "app" } = opts;
|
|
31
31
|
console.info(`Vite running in mode: ${mode}`);
|
|
@@ -90,7 +90,8 @@ export function HvAppShellVitePlugin(opts = {}, env = {}) {
|
|
|
90
90
|
}, {}),
|
|
91
91
|
...extraDependencies,
|
|
92
92
|
...Object.entries(appShellConfiguration?.apps ?? {}).reduce((acc, [key, value]) => {
|
|
93
|
-
|
|
93
|
+
const normalizedKey = disableAppsKeyNormalization ? key : `${key}/`;
|
|
94
|
+
acc[normalizedKey] = value;
|
|
94
95
|
return acc;
|
|
95
96
|
}, {}),
|
|
96
97
|
[`${packageJson.name}/`]: "./",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/app-shell-vite-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Hitachi Vantara UI Kit Team",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
},
|
|
60
60
|
"./package.json": "./package.json"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "f2e71003d8859dc249fe7b5515738b874abfc6b7"
|
|
63
63
|
}
|