We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v-t
Darwin
v18.20.4
3.14.1592
3.15.0
2.10.4
[email protected]
-
default
@nuxtjs/[email protected]
@pinia/[email protected]
@vueuse/[email protected]
https://codesandbox.io/p/devbox/exciting-hamilton-zr33kf?workspaceId=5bf11af2-101a-4cf1-8bd0-60608094be07
It seems that with the latest addition to support v-t SSR (v9.0) some Javascript functionalities stopped working.
I ran into a couple of issues:
const test = computed(() => { return "welcome"; }); ... <span v-t="{ path: test, args: { page } }" />
<span v-t="{ path: 'welcome', args: { page: page?.count } }" />
const shortPath = "come"; ... <p v-t="{ path: `wel${shortPath}`, args: { test: test } }"></p>
<p v-t="{ path: 'welcome', args: { test: test ?? 'bar' } }"></p>
It seems to only affect SSR.
[vite-node] [PARSE_ERROR] /app.vue <br><pre>Expression expected /* Injection by vite-plugin-vue-inspector Start */ import { createElementVNode as __createElementVNode,createElementBlock as __createElementBlock } from "/_nuxt/node_modules/vue/index.mjs" import { useI18n } from "/_nuxt/node_modules/vue-i18n/dist/vue-i18n.mjs"; import { ref, computed } from "/_nuxt/node_modules/vue/index.mjs"; function _interopVNode(vnode) { if (vnode && vnode.props && 'data-v-inspector' in vnode.props) { const data = vnode.props['data-v-inspector'] delete vnode.props['data-v-inspector'] Object.defineProperty(vnode.props, '__v_inspector', { value: data, enumerable: false }) } return vnode } function _createElementVNode(...args) { return _interopVNode(__createElementVNode(...args)) } function _createElementBlock(...args) { return _interopVNode(__createElementBlock(...args)) } /* Injection by vite-plugin-vue-inspector End */ const shortPath = "come"; const _sfc_main = { __name: 'app', setup(__props, { expose: __expose }) { __expose(); const { setLocale } = useI18n(); const test = ref("bar"); const test2 = { foo: "bar", }; // crashes on build const path = computed(() => { return "welcome"; }); const __returned__ = { setLocale, test, test2, path, shortPath } Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true }) return __returned__ } } import { undefined as _undefined, createCommentVNode as _createCommentVNode, openBlock as _openBlock, } from "/_nuxt/node_modules/vue/index.mjs" const _hoisted_1 = { "data-v-inspector": "app.vue:18:3" } const _hoisted_2 = { "data-v-inspector": "app.vue:19:5" } const _hoisted_3 = { "data-v-inspector": "app.vue:20:7" } const _hoisted_4 = { "data-v-inspector": "app.vue:21:7" } const _hoisted_5 = { "data-v-inspector": "app.vue:23:7" } function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return (_openBlock(), _createElementBlock("div", _hoisted_1, [ _createElementVNode("div", _hoisted_2, [ _createElementVNode("p", _hoisted_3, _toDisplayString((_ctx.$t)('welcome', { test: $setup.test2.foo }, { })), 1 /* TEXT */), _createElementVNode("p", _hoisted_4, _toDisplayString((_ctx.$t)($setup.path, { test: $setup.test2.foo }, { })), 1 /* TEXT */), _createElementVNode("p", _hoisted_5, _toDisplayString((_ctx.$t)(, { test: }, { })), 1 /* TEXT */), _createCommentVNode(" <p v-t=\"{ path: `wel${shortPath}`, args: { test: test } }\"></p> "), _createCommentVNode(" <p v-t=\"{ path: 'welcome', args: { test: test?.foo } }\"></p> ") ]) ])) } import _export_sfc from "/_nuxt/@id/__x00__plugin-vue:export-helper" export default /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render],['__file',"/project/workspace/app.vue"]])</pre><br>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Darwin
v18.20.4
3.14.1592
3.15.0
2.10.4
[email protected]
-
default
@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@pinia/[email protected]
,@vueuse/[email protected]
,[email protected]
-
Reproduction
https://codesandbox.io/p/devbox/exciting-hamilton-zr33kf?workspaceId=5bf11af2-101a-4cf1-8bd0-60608094be07
Describe the bug
It seems that with the latest addition to support
v-t
SSR (v9.0) some Javascript functionalities stopped working.I ran into a couple of issues:
Additional context
It seems to only affect SSR.
Logs
The text was updated successfully, but these errors were encountered: