8000 docs: In-DOM Root Component Template does not support <script setup> by baiwusanyu-c · Pull Request #2385 · vuejs/docs · GitHub
[go: up one dir, main page]

Skip to content

docs: In-DOM Root Component Template does not support <script setup> #2385

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

Merged
merged 8 commits into from
Sep 20, 2023
Next Next commit
docs: In-DOM Root Component Template does not support <script setup>
  • Loading branch information
baiwusanyu-c committed May 29, 2023
commit e040a19659d0970e9483daeb9ea16be3c5a59652
3 changes: 2 additions & 1 deletion src/api/options-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ A string template for the component.
If the root component of your application doesn't have a `template` or `render` option specified, Vue will try to use the `innerHTML` of the mounted element as the template instead.

:::warning Security Note
Only use template sources that you can trust. Do not use user-provided content as your template. See [Security Guide](/guide/best-practices/security#rule-no-1-never-use-non-trusted-templates) for more details.
- Only use template sources that you can trust. Do not use user-provided content as your template. See [Security Guide](/guide/best-practices/security#rule-no-1-never-use-non-trusted-templates) for more details.
- In-DOM Root Component Template does not support `<script setup>` [Related Discussion](https://github.com/vuejs/core/issues/8391).
:::

## render {#render}
Expand Down
4 changes: 4 additions & 0 deletions src/guide/essentials/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ Vue will automatically use the container's `innerHTML` as the template if the ro

In-DOM templates are often used in applications that are [using Vue without a build step](/guide/quick-start.html#using-vue-from-cdn). They can also be used in conjunction with server-side frameworks, where the root template might be generated dynamically by the server.

:::warning Notes on In-DOM Root Component Template
In-DOM Root Component Template does not support `<script setup>` [Related Discussion](https://github.com/vuejs/core/issues/8391).
:::

## App Configurations {#app-configurations}

The application instance exposes a `.config` object that allows us to configure a few app-level options, for example, defining an app-level error handler that captures errors from all descendant components:
Expand Down
0