-
Notifications
You must be signed in to change notification settings - Fork 0
Nuxt Upgrade
Yongku cho edited this page Dec 24, 2019
·
9 revisions
- Release Note를 통해 버전을 한 단계씩 올린다.
- 이슈는 검색이 안될 수 있음. 현상을 보고 해결한다.
2.8.0
=> 2.9.2
버전 업그레이드 후 SPA 모드는 커멘드 옵션으로 변경되었다. 개발 단계 서버 실행 시, nuxt --spa
로 실행해야 한다.
nuxt 2.9.x 부터 app/router.scrollBehavior.js로 처리
nuxt.config.ts를 정상적으로 사용하기 위해서는 @nuxt/typescript-runtime
모듈을 설치해야 한다.
nuxt.config.ts에는 TypeScript를 사용하도록 설정하는 파일이 있다. 그렇기 때문에 Runtime 설정도 필요하다.
설치 후에는 scripts
에 nuxt
로 사용했던 명령어를 nuxt-ts
로 변경이 필요하다.
- import NuxtConfiguration from '@nuxt/config'
+ import { Configuration } from '@nuxt/types'
- const config: NuxtConfiguration = {
+ const config: Configuration = {
- devModules: [
- // Doc: https://github.com/nuxt-community/eslint-module
- '@nuxtjs/eslint-module'
- ],
+ buildModules: [
+ [
+ '@nuxt/typescript-build',
+ {
+ typeCheck: true,
+ ignoreNotFoundWarnings: true
+ }
+ ]
+ ],
- "dev": "nuxt",
- "build": "nuxt build",
- "generate": "nuxt generate",
- "start": "nuxt start",
+ "dev": "nuxt-ts --spa",
+ "build": "nuxt-ts build --spa",
+ "generate": "nuxt-ts generate",
+ "start": "nuxt-ts start",
"dependencies": {
+ "@nuxt/typescript-runtime": "^0.3.3",
- "nuxt": "^2.0.0",
+ "nuxt": "^2.11.0",
"devDependencies": {
- "@nuxt/typescript": "^2.8.1",
+ "@nuxt/typescript-build": "^0.5.2",
- "@nuxt/vue-app",
- "@nuxt/config"
+ "@nuxt/types"
- import { Middleware } from '@nuxt/vue-app'
+ import { Middleware } from '@nuxt/types'