Skip to content

Commit f2f4d13

Browse files
AloisSeckarbrc-dd
andauthored
docs: side note about HTML-mode in tutorial (#2641)
Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
1 parent 2b3c219 commit f2f4d13

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/tutorial/src/step-1/description.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,33 @@ If you are an experienced developer coming from Vue 2 or other frameworks, there
2121

2222
- 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.
2323

24+
<div class="html">
25+
26+
:::tip
27+
If you're about to use HTML-mode without a build step in your own applications, make sure you either change imports to:
28+
29+
```js
30+
import { ... } from 'vue/dist/vue.esm-bundler.js'
31+
```
32+
33+
inside your scripts or configure your build tool to resolve `vue` accordingly. Sample config for [Vite](https://vitejs.dev/):
34+
35+
```js
36+
// vite.config.js
37+
export default {
38+
resolve: {
39+
alias: {
40+
vue: 'vue/dist/vue.esm-bundler.js'
41+
}
42+
}
43+
}
44+
```
45+
46+
See the respective [section in Tooling guide](/guide/scaling-up/tooling.html#note-on-in-browser-template-compilation) for more information.
47+
:::
48+
49+
</div>
50+
2451
</details>
2552

2653
Ready? Click "Next" to get started.

0 commit comments

Comments
 (0)