@open-xchange/vite-plugin-ox-manifests 0.7.3 → 0.8.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/plugins/gettext.js +1 -1
- package/dist/plugins/manifests.js +4 -1
- package/package.json +15 -13
package/dist/plugins/gettext.js
CHANGED
|
@@ -52,7 +52,7 @@ export default definePlugin(() => {
|
|
|
52
52
|
modules.push(chunk.facadeModuleId);
|
|
53
53
|
for (const id of modules) {
|
|
54
54
|
const meta = this.getModuleInfo(id)?.meta;
|
|
55
|
-
if (meta
|
|
55
|
+
if (meta?.gettext?.dictionary === true) {
|
|
56
56
|
(meta.manifests ??= []).push({ namespace: 'i18n', path: '' });
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -27,6 +27,7 @@ export default definePlugin(({ supportedEntryExtensions, entryPoints, manifestsA
|
|
|
27
27
|
let resolvedConfig;
|
|
28
28
|
let inputOptions;
|
|
29
29
|
let viteManifestPlugin;
|
|
30
|
+
let environment;
|
|
30
31
|
async function buildViteManifests(options, bundle) {
|
|
31
32
|
return new Promise((resolve, reject) => {
|
|
32
33
|
// local async context to satisfy type checker expecting void callback for promise constructor
|
|
@@ -44,7 +45,8 @@ export default definePlugin(({ supportedEntryExtensions, entryPoints, manifestsA
|
|
|
44
45
|
reject(new Error(`${PROJECT_NAME}: received unexpected manifest data from plugin 'vite:manifest'`));
|
|
45
46
|
}
|
|
46
47
|
},
|
|
47
|
-
getFileName: () => 'Not implemented'
|
|
48
|
+
getFileName: () => 'Not implemented',
|
|
49
|
+
environment
|
|
48
50
|
};
|
|
49
51
|
// manually invoke plugin hooks (in a local async context to satisfy type checker expecting sync promise callbacks)
|
|
50
52
|
await viteManifestPlugin.buildStart.call(context, inputOptions);
|
|
@@ -102,6 +104,7 @@ export default definePlugin(({ supportedEntryExtensions, entryPoints, manifestsA
|
|
|
102
104
|
},
|
|
103
105
|
buildStart(options) {
|
|
104
106
|
inputOptions = options;
|
|
107
|
+
environment = this.environment;
|
|
105
108
|
},
|
|
106
109
|
// specific call to collect all manifests
|
|
107
110
|
getManifests() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/vite-plugin-ox-manifests",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "A vite plugin to concat and serve ox manifests",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,27 +17,29 @@
|
|
|
17
17
|
"Richard Petersen"
|
|
18
18
|
],
|
|
19
19
|
"license": "MIT",
|
|
20
|
+
"scripts": {
|
|
21
|
+
"prepack": "pnpx rimraf dist && tsc",
|
|
22
|
+
"prepare": "pnpx rimraf dist && tsc",
|
|
23
|
+
"lint": "eslint .",
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"test": "tsc && vitest"
|
|
26
|
+
},
|
|
20
27
|
"dependencies": {
|
|
28
|
+
"@open-xchange/rollup-plugin-po2json": "workspace:*",
|
|
29
|
+
"@open-xchange/vite-plugin-ox-externals": "workspace:*",
|
|
21
30
|
"chokidar": "^4.0.1",
|
|
22
31
|
"fast-glob": "^3.3.2",
|
|
23
32
|
"magic-string": "^0.30.11",
|
|
24
|
-
"parseurl": "^1.3.3"
|
|
25
|
-
"@open-xchange/rollup-plugin-po2json": "0.9.2",
|
|
26
|
-
"@open-xchange/vite-plugin-ox-externals": "0.8.0"
|
|
33
|
+
"parseurl": "^1.3.3"
|
|
27
34
|
},
|
|
28
35
|
"devDependencies": {
|
|
36
|
+
"@open-xchange/lint": "workspace:*",
|
|
29
37
|
"@types/node": "^22.7.4",
|
|
30
38
|
"@types/parseurl": "^1.3.3",
|
|
31
39
|
"less": "^4.2.0",
|
|
32
40
|
"rollup": "^4.28.0",
|
|
33
41
|
"typescript": "^5.6.2",
|
|
34
|
-
"vite": "^
|
|
35
|
-
"vitest": "^
|
|
36
|
-
"@open-xchange/lint": "0.2.0"
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"lint": "eslint .",
|
|
40
|
-
"build": "tsc",
|
|
41
|
-
"test": "tsc && vitest"
|
|
42
|
+
"vite": "^6.0.0",
|
|
43
|
+
"vitest": "^3.0.0"
|
|
42
44
|
}
|
|
43
|
-
}
|
|
45
|
+
}
|