From c768b6ed8951fab5f2ccf98be63f4f2a2308c7f4 Mon Sep 17 00:00:00 2001 From: Simo Mafuxwana Date: Fri, 7 Jul 2023 22:58:43 +0200 Subject: [PATCH] docs(vue): Improve documentation for removing Typescript steps in v7 (#3002) --- docs/vue/quickstart.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/vue/quickstart.md b/docs/vue/quickstart.md index a5289b589cc..20b8adc86f1 100644 --- a/docs/vue/quickstart.md +++ b/docs/vue/quickstart.md @@ -45,7 +45,7 @@ So, if you’d prefer to use JavaScript instead of TypeScript, you can. After ge 1. Remove TypeScript dependencies: ```shell -npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/cli-plugin-typescript @vue/eslint-config-typescript +npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/cli-plugin-typescript @vue/eslint-config-typescript vue-tsc ``` 2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `src/router/index.ts` and `src/main.ts`. If you're using tests, also change the extension of files in the `tests` directory. @@ -62,6 +62,10 @@ npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @ty 8. Delete the `tsconfig.json` file. +9. In package.json, change the build script from `"build": "vue-tsc && vite build"` to `"build": "vite build"` + +10. Install terser `npm i -D terser`. + ## A look at a Vue Component The base of our app will be in the `src` directory, and the main entry point will be our `main.ts` file. If we open our project in a code editor and open `main.ts`, we should see the following: