@wuchale/jsx 0.11.0 → 0.11.2

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 CHANGED
@@ -64,7 +64,7 @@ export function getDefaultLoaderPath(loader, bundle) {
64
64
  return null;
65
65
  }
66
66
  if (loader === 'default') {
67
- return getDefaultLoaderPathVanilla('bundle', bundle);
67
+ return getDefaultLoaderPathVanilla('vite', bundle);
68
68
  }
69
69
  if (bundle) {
70
70
  loader += '.bundle';
@@ -129,7 +129,7 @@ export class JSXTransformer extends Transformer {
129
129
  if (!pass) {
130
130
  return [];
131
131
  }
132
- this.mstr.update(node.start + startWh, node.end - endWh, `{${this.vars().rtTrans}(${this.index.get(getKey(msgInfo.msgStr, msgInfo.context))})}`);
132
+ this.mstr.update(node.start + startWh, node.end - endWh, `{${this.literalRepl(msgInfo)}}`);
133
133
  return [msgInfo];
134
134
  };
135
135
  visitJSXFragment = (node) => this.visitChildrenJ(node);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wuchale/jsx",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "description": "Protobuf-like i18n from plain code: JSX adapter",
5
5
  "scripts": {
6
6
  "dev": "tsc --watch",
@@ -61,7 +61,7 @@
61
61
  "@sveltejs/acorn-typescript": "^1.0.9",
62
62
  "acorn": "^8.16.0",
63
63
  "magic-string": "^0.30.21",
64
- "wuchale": "^0.21.0"
64
+ "wuchale": "^0.22.1"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@types/estree-jsx": "^1.0.5",
@@ -1,7 +1,8 @@
1
1
  import { createSignal } from 'solid-js'
2
2
  import toRuntime from 'wuchale/runtime'
3
+ import { locales } from '${DATA}'
3
4
 
4
- const [locale, setLocale] = createSignal('en')
5
+ const [locale, setLocale] = createSignal(locales[0])
5
6
 
6
7
  export { setLocale }
7
8