From 426e520eb5e695b807f9103a9fc0080f12d0fd3b Mon Sep 17 00:00:00 2001 From: huangdongcai Date: Sun, 27 Mar 2022 00:03:14 +0800 Subject: [PATCH 1/3] Add section on README about the recommended Node.js version. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ff0daf417c..e39ee6ffc0 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,7 @@ pnpm run dev ## Working on the theme If changes need to made for the theme, check out the [instructions for developing the theme alongside the docs](https://github.com/vuejs/vue-theme#developing-with-real-content). + +## Node.js Version Requirement + +This project uses JavaScript's new features like optional chaining, so it is recommended to use `v14.0.0` or higher. From cb92b49fc8862b746d67b7eb80506d8afec684bb Mon Sep 17 00:00:00 2001 From: huangdongcai Date: Sun, 27 Mar 2022 00:24:17 +0800 Subject: [PATCH 2/3] fix typo in the tutorial --- src/tutorial/src/step-11/description.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tutorial/src/step-11/description.md b/src/tutorial/src/step-11/description.md index 6696a9e8be..d2c6b73fff 100644 --- a/src/tutorial/src/step-11/description.md +++ b/src/tutorial/src/step-11/description.md @@ -45,7 +45,7 @@ Then, we can use the component in the template as:
```js -import ChildComp from './ChildComp.vue' +import ChildComp from './ChildComp.js' createApp({ components: { From 574a371f3a2fc0ec4fa49e732339c161454179e4 Mon Sep 17 00:00:00 2001 From: huangdongcai Date: Mon, 11 Apr 2022 12:40:26 +0800 Subject: [PATCH 3/3] Update README and package.json Update them according to the result --- README.md | 7 +++---- package.json | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e39ee6ffc0..03a3c37764 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ pnpm i pnpm run dev ``` +This project requires Node.js to be `v14.0.0` or higher, because we use new JavaScript features in our code, such as optional chaining. + + ## Working on the content - See VitePress docs on supported [Markdown Extensions](https://vitepress.vuejs.org/guide/markdown.html) and the ability to [use Vue syntax inside markdown](https://vitepress.vuejs.org/guide/using-vue.html). @@ -20,7 +23,3 @@ pnpm run dev ## Working on the theme If changes need to made for the theme, check out the [instructions for developing the theme alongside the docs](https://github.com/vuejs/vue-theme#developing-with-real-content). - -## Node.js Version Requirement - -This project uses JavaScript's new features like optional chaining, so it is recommended to use `v14.0.0` or higher. diff --git a/package.json b/package.json index cc7b6da690..04532a019a 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,7 @@ { + "engines": { + "node": ">=14.0.0" + }, "scripts": { "dev": "vitepress", "build": "vitepress build",