Skip to content

Commit

Permalink
feat: side note about HTML-mode in tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
AloisSeckar committed Jan 2, 2024
1 parent c598a04 commit 2f116da
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/tutorial/src/step-1/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,29 @@ If you are an experienced developer coming from Vue 2 or other frameworks, there

- You can also switch between SFC-mode or HTML-mode. The former will show code examples in <a target="_blank" href="/guide/introduction.html#single-file-components">Single-File Component</a> (SFC) format, which is what most developers use when they use Vue with a build step. HTML-mode shows usage without a build step.

:::tip
If you're about to use HTML-mode without a build step in your own applications, make sure you either change imports to

```js
import { * } from vue/dist/vue.esm-bundler.js
```

inside your scripts or configure your build tool to resolve `vue` accordingly. Sample config for [Vite](https://vitejs.dev/):

```js
// vite.config.js
export default {
resolve: {
alias: {
vue: 'vue/dist/vue.esm-bundler.js'
}
}
}
```

See the respective [section in Tooling guide](/guide/scaling-up/tooling.html#note-on-in-browser-template-compilation) for more information.
:::

</details>

Ready? Click "Next" to get started.

0 comments on commit 2f116da

Please sign in to comment.