@vocab/vite 0.1.1 → 0.2.1
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/chunks/dist/vocab-vite-chunks.cjs.d.ts +2 -0
- package/{create-vocab-chunks/dist/vocab-vite-create-vocab-chunks.cjs.dev.js → chunks/dist/vocab-vite-chunks.cjs.dev.js} +1 -0
- package/chunks/dist/vocab-vite-chunks.cjs.js +7 -0
- package/{create-vocab-chunks/dist/vocab-vite-create-vocab-chunks.cjs.prod.js → chunks/dist/vocab-vite-chunks.cjs.prod.js} +1 -0
- package/{create-vocab-chunks/dist/vocab-vite-create-vocab-chunks.esm.js → chunks/dist/vocab-vite-chunks.esm.js} +1 -1
- package/chunks/package.json +4 -0
- package/dist/declarations/src/chunks.d.ts +2 -0
- package/dist/declarations/src/create-language.d.ts +0 -1
- package/dist/declarations/src/get-chunk-name.d.ts +1 -0
- package/dist/declarations/src/runtime.d.ts +2 -0
- package/dist/vocab-vite.cjs.dev.js +3 -2
- package/dist/vocab-vite.cjs.prod.js +3 -2
- package/dist/vocab-vite.esm.js +3 -2
- package/package.json +13 -13
- package/runtime/dist/vocab-vite-runtime.cjs.d.ts +2 -0
- package/runtime/dist/vocab-vite-runtime.cjs.js +7 -0
- package/runtime/package.json +4 -0
- package/create-language/dist/vocab-vite-create-language.cjs.d.ts +0 -2
- package/create-language/dist/vocab-vite-create-language.cjs.js +0 -7
- package/create-language/package.json +0 -4
- package/create-vocab-chunks/dist/vocab-vite-create-vocab-chunks.cjs.d.ts +0 -2
- package/create-vocab-chunks/dist/vocab-vite-create-vocab-chunks.cjs.js +0 -7
- package/create-vocab-chunks/package.json +0 -4
- package/{create-language/dist/vocab-vite-create-language.cjs.dev.js → runtime/dist/vocab-vite-runtime.cjs.dev.js} +1 -1
- package/{create-language/dist/vocab-vite-create-language.cjs.prod.js → runtime/dist/vocab-vite-runtime.cjs.prod.js} +1 -1
- package/{create-language/dist/vocab-vite-create-language.esm.js → runtime/dist/vocab-vite-runtime.esm.js} +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from "../../dist/declarations/src/chunks.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidm9jYWItdml0ZS1jaHVua3MuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9kaXN0L2RlY2xhcmF0aW9ucy9zcmMvY2h1bmtzLmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getChunkName(lang: string): string;
|
|
@@ -65,7 +65,7 @@ const transformVocabFile = async (code, id, config) => {
|
|
|
65
65
|
const exportName = esmExports[0];
|
|
66
66
|
trace(`Found ESM export '${exportName.n}' in ${id}`);
|
|
67
67
|
result = /* ts */`
|
|
68
|
-
import { createLanguage, createTranslationFile } from '@vocab/vite/
|
|
68
|
+
import { createLanguage, createTranslationFile } from '@vocab/vite/runtime';
|
|
69
69
|
${translations}
|
|
70
70
|
export { translations as ${exportName.n} };
|
|
71
71
|
`;
|
|
@@ -75,7 +75,7 @@ const transformVocabFile = async (code, id, config) => {
|
|
|
75
75
|
const exportName = findExportNames(code, 'cjs')[0];
|
|
76
76
|
trace(`Found CJS export '${exportName}' in ${id}`);
|
|
77
77
|
result = /* ts */`
|
|
78
|
-
import { createLanguage, createTranslationFile } from '@vocab/vite/
|
|
78
|
+
import { createLanguage, createTranslationFile } from '@vocab/vite/runtime';
|
|
79
79
|
${translations}
|
|
80
80
|
exports.${exportName} = translations;
|
|
81
81
|
`;
|
|
@@ -109,6 +109,7 @@ function vitePluginVocab({
|
|
|
109
109
|
return {
|
|
110
110
|
name: 'vite-plugin-vocab',
|
|
111
111
|
apply: 'build',
|
|
112
|
+
enforce: 'pre',
|
|
112
113
|
configResolved(config) {
|
|
113
114
|
// Check if the build is for SSR. This plugin should not run for SSR builds.
|
|
114
115
|
isSSR = Boolean(config.build.ssr);
|
|
@@ -65,7 +65,7 @@ const transformVocabFile = async (code, id, config) => {
|
|
|
65
65
|
const exportName = esmExports[0];
|
|
66
66
|
trace(`Found ESM export '${exportName.n}' in ${id}`);
|
|
67
67
|
result = /* ts */`
|
|
68
|
-
import { createLanguage, createTranslationFile } from '@vocab/vite/
|
|
68
|
+
import { createLanguage, createTranslationFile } from '@vocab/vite/runtime';
|
|
69
69
|
${translations}
|
|
70
70
|
export { translations as ${exportName.n} };
|
|
71
71
|
`;
|
|
@@ -75,7 +75,7 @@ const transformVocabFile = async (code, id, config) => {
|
|
|
75
75
|
const exportName = findExportNames(code, 'cjs')[0];
|
|
76
76
|
trace(`Found CJS export '${exportName}' in ${id}`);
|
|
77
77
|
result = /* ts */`
|
|
78
|
-
import { createLanguage, createTranslationFile } from '@vocab/vite/
|
|
78
|
+
import { createLanguage, createTranslationFile } from '@vocab/vite/runtime';
|
|
79
79
|
${translations}
|
|
80
80
|
exports.${exportName} = translations;
|
|
81
81
|
`;
|
|
@@ -109,6 +109,7 @@ function vitePluginVocab({
|
|
|
109
109
|
return {
|
|
110
110
|
name: 'vite-plugin-vocab',
|
|
111
111
|
apply: 'build',
|
|
112
|
+
enforce: 'pre',
|
|
112
113
|
configResolved(config) {
|
|
113
114
|
// Check if the build is for SSR. This plugin should not run for SSR builds.
|
|
114
115
|
isSSR = Boolean(config.build.ssr);
|
package/dist/vocab-vite.esm.js
CHANGED
|
@@ -40,7 +40,7 @@ const transformVocabFile = async (code, id, config) => {
|
|
|
40
40
|
const exportName = esmExports[0];
|
|
41
41
|
trace(`Found ESM export '${exportName.n}' in ${id}`);
|
|
42
42
|
result = /* ts */`
|
|
43
|
-
import { createLanguage, createTranslationFile } from '@vocab/vite/
|
|
43
|
+
import { createLanguage, createTranslationFile } from '@vocab/vite/runtime';
|
|
44
44
|
${translations}
|
|
45
45
|
export { translations as ${exportName.n} };
|
|
46
46
|
`;
|
|
@@ -50,7 +50,7 @@ const transformVocabFile = async (code, id, config) => {
|
|
|
50
50
|
const exportName = findExportNames(code, 'cjs')[0];
|
|
51
51
|
trace(`Found CJS export '${exportName}' in ${id}`);
|
|
52
52
|
result = /* ts */`
|
|
53
|
-
import { createLanguage, createTranslationFile } from '@vocab/vite/
|
|
53
|
+
import { createLanguage, createTranslationFile } from '@vocab/vite/runtime';
|
|
54
54
|
${translations}
|
|
55
55
|
exports.${exportName} = translations;
|
|
56
56
|
`;
|
|
@@ -84,6 +84,7 @@ function vitePluginVocab({
|
|
|
84
84
|
return {
|
|
85
85
|
name: 'vite-plugin-vocab',
|
|
86
86
|
apply: 'build',
|
|
87
|
+
enforce: 'pre',
|
|
87
88
|
configResolved(config) {
|
|
88
89
|
// Check if the build is for SSR. This plugin should not run for SSR builds.
|
|
89
90
|
isSSR = Boolean(config.build.ssr);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vocab/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"author": "SEEK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -16,26 +16,26 @@
|
|
|
16
16
|
"module": "./dist/vocab-vite.esm.js",
|
|
17
17
|
"default": "./dist/vocab-vite.cjs.js"
|
|
18
18
|
},
|
|
19
|
-
"./
|
|
20
|
-
"module": "./
|
|
21
|
-
"default": "./
|
|
19
|
+
"./runtime": {
|
|
20
|
+
"module": "./runtime/dist/vocab-vite-runtime.esm.js",
|
|
21
|
+
"default": "./runtime/dist/vocab-vite-runtime.cjs.js"
|
|
22
22
|
},
|
|
23
|
-
"./
|
|
24
|
-
"module": "./
|
|
25
|
-
"default": "./
|
|
23
|
+
"./chunks": {
|
|
24
|
+
"module": "./chunks/dist/vocab-vite-chunks.esm.js",
|
|
25
|
+
"default": "./chunks/dist/vocab-vite-chunks.cjs.js"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"preconstruct": {
|
|
29
29
|
"entrypoints": [
|
|
30
30
|
"index.ts",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"runtime.ts",
|
|
32
|
+
"chunks.ts"
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"runtime",
|
|
38
|
+
"chunks"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"cjs-module-lexer": "^1.2.2",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/debug": "^4.1.5",
|
|
49
|
-
"vite": "^
|
|
49
|
+
"vite": "^6.3.5"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"vite": "^5.4.8"
|
|
52
|
+
"vite": "^5.4.8 || ^6.0.0"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from "../../dist/declarations/src/runtime.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidm9jYWItdml0ZS1ydW50aW1lLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vZGlzdC9kZWNsYXJhdGlvbnMvc3JjL3J1bnRpbWUuZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from "../../dist/declarations/src/create-language.js";
|
|
2
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidm9jYWItdml0ZS1jcmVhdGUtbGFuZ3VhZ2UuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9kaXN0L2RlY2xhcmF0aW9ucy9zcmMvY3JlYXRlLWxhbmd1YWdlLmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from "../../dist/declarations/src/create-vocab-chunks.js";
|
|
2
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidm9jYWItdml0ZS1jcmVhdGUtdm9jYWItY2h1bmtzLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vZGlzdC9kZWNsYXJhdGlvbnMvc3JjL2NyZWF0ZS12b2NhYi1jaHVua3MuZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var icuHandler = require('@vocab/core/icu-handler');
|
|
6
5
|
var translationFile = require('@vocab/core/translation-file');
|
|
6
|
+
var icuHandler = require('@vocab/core/icu-handler');
|
|
7
7
|
|
|
8
8
|
const createLanguage = loadImport => {
|
|
9
9
|
let promiseValue;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var icuHandler = require('@vocab/core/icu-handler');
|
|
6
5
|
var translationFile = require('@vocab/core/translation-file');
|
|
6
|
+
var icuHandler = require('@vocab/core/icu-handler');
|
|
7
7
|
|
|
8
8
|
const createLanguage = loadImport => {
|
|
9
9
|
let promiseValue;
|