Skip to content
New issue

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

Example for transforming custom blocks broken #208

Closed
8 of 9 tasks
cawa-93 opened this issue Jul 20, 2023 · 1 comment · Fixed by #221
Closed
8 of 9 tasks

Example for transforming custom blocks broken #208

cawa-93 opened this issue Jul 20, 2023 · 1 comment · Fixed by #221
Labels
documentation Improvements or additions to documentation

Comments

@cawa-93
Copy link

cawa-93 commented Jul 20, 2023

Related plugins

Describe the bug

I casually copy Example for transforming custom blocks from docs and it doesn't work.

My component

<script setup></script>

<template>
  <div>Hello</div>
</template>

<i18n lang="json">
{ "message": "hello" }
</i18n>

According to docs transformed code looks like this:

export default Comp => {
	Comp.i18n = export const message = "hello";
	export default {
		message: message
	};
}

Reproduction

https://stackblitz.com/edit/vitejs-vite-a3mpsu?file=vite.config.js

Steps to reproduce

No response

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.20.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
    pnpm: 8.6.3 - /usr/local/bin/pnpm
  npmPackages:
    @vitejs/plugin-vue: ^4.2.3 => 4.2.3 
    vite: ^4.4.4 => 4.4.4

Used Package Manager

npm

Logs

No response

Validations

@Plumbiu
Copy link
Contributor

Plumbiu commented Jul 25, 2023

I guess we are using "yaml", so this code <i18n lang="json"> should be written like this <i18n lang="yaml">

you can see here:https://stackblitz.com/edit/vitejs-vite-gfchex

@sapphi-red sapphi-red added documentation Improvements or additions to documentation and removed pending triage labels Jul 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants