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

Support custom delimiters for petite-vue #1804

Closed
ivanjeremic opened this issue Sep 2, 2022 · 3 comments
Closed

Support custom delimiters for petite-vue #1804

ivanjeremic opened this issue Sep 2, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@ivanjeremic
Copy link

petite-vue same as vue has the option to set custom delimiters, ${var} is a common one but still not supported in HTML for petite-vue or other in HTML solutions. Would be awesome to have it work out of the box just like {{var}}

@johnsoncodehk johnsoncodehk added the enhancement New feature or request label Sep 6, 2022
@johnsoncodehk
Copy link
Member

You can use resolveTemplateCompilerOptions from plugin API, see #1991.

@ivanjeremic
Copy link
Author

ivanjeremic commented Oct 26, 2022

It is unclear to me where to find resolveTemplateCompilerOptions should I put this in the vscode/settings.json or does it belong to a special config file? Also any place where I can find the API docs for resolveTemplateCompilerOptions ?

@johnsoncodehk
Copy link
Member

It don't have documatation for now, but you can reference https://github.com/sxzz/unplugin-vue-macros/blob/37fa0cda384e0df51b8c869d3ffc67bac4972230/packages/volar/src/short-vmodel.ts.

And it should add to tsconfig:

{
  "vueCompilerOptions": {
    "plugins": ["./your-plugin.js"]
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants