Skip to content

nuxt typescript v2.11에서 v2.12로 마이그레이션

Yongku cho edited this page Aug 25, 2020 · 2 revisions

마이그레이션 과정

2.11.0 => 2.12.0
  1. package.json 파일내 패키지 버전 변경
-    "@nuxt/typescript-runtime": "^0.3.3",
+    "@nuxt/typescript-runtime": "^1.0.0",
-    "nuxt": "^2.11.0",
+    "nuxt": "^2.12.0",
-    "@nuxt/typescript-build": "^0.5.2",
+    "@nuxt/typescript-build": "^2.0.2",
-    "@nuxtjs/eslint-config": "^1.0.1",
+    "@nuxt/types": "^2.14.3",
  1. package-lock.json 제거
  2. node_modules 제거
  3. npm install

기능 변경 사항

  • @nuxtjs/eslint-config은 제거, @nuxtjs/eslint-config-typescript 사용
  • @nuxt/types가 기존에 @nuxt/typescript-builddep에 있었는 데, 현재는 설치 필요함
  • nuxt.config.ts
    • 인터페이스 수정: Configuration => NuxtConfig
    • typeCheck의 eslint 필드의 타입이 수정됨
- typeCheck: {
-   eslint: IS_LOCAL
- },
+ typeCheck: IS_LOCAL
+   ? true
+   : {
+       eslint: undefined
+   },
  • ESLint 옵션 변경됨. node/handle-callback-err: off 필요
Clone this wiki locally