@wuchale/vite-plugin 0.14.6 → 0.14.8
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/index.js +3 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ class Wuchale {
|
|
|
23
23
|
#init = async (mode) => {
|
|
24
24
|
this.#config = await getConfig(this.#configPath);
|
|
25
25
|
this.#locales = [this.#config.sourceLocale, ...this.#config.otherLocales];
|
|
26
|
-
this.#log = new Logger(this.#config.
|
|
26
|
+
this.#log = new Logger(this.#config.logLevel);
|
|
27
27
|
if (Object.keys(this.#config.adapters).length === 0) {
|
|
28
28
|
throw Error('At least one adapter is needed.');
|
|
29
29
|
}
|
|
@@ -100,14 +100,14 @@ class Wuchale {
|
|
|
100
100
|
if (!source.startsWith(virtualPrefix)) {
|
|
101
101
|
return null;
|
|
102
102
|
}
|
|
103
|
-
return `${virtualResolvedPrefix}${source}?
|
|
103
|
+
return `${virtualResolvedPrefix}${source}?_w_i_=${importer}`;
|
|
104
104
|
};
|
|
105
105
|
load = (id) => {
|
|
106
106
|
const prefix = virtualResolvedPrefix + virtualPrefix;
|
|
107
107
|
if (!id.startsWith(prefix)) {
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
110
|
-
const [path, importer] = id.slice(prefix.length).split('?
|
|
110
|
+
const [path, importer] = id.slice(prefix.length).split('?_w_i_=');
|
|
111
111
|
const [part, ...rest] = path.split('/');
|
|
112
112
|
if (part === 'catalog') {
|
|
113
113
|
const [adapterKey, loadID, locale] = rest;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wuchale/vite-plugin",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.8",
|
|
4
4
|
"description": "Protobuf-like i18n from plain code: Vite plugin",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "tsc --watch",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"author": "K1DV5",
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"wuchale": "^0.
|
|
43
|
+
"wuchale": "^0.17.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"typescript": "^5.
|
|
46
|
+
"typescript": "^5.9.3"
|
|
47
47
|
},
|
|
48
48
|
"type": "module"
|
|
49
49
|
}
|