Nuxt - ChoDragon9/posts GitHub Wiki

์ •๋ฆฌ

๋ฉ”๋ชจ

  • css ๋ถ„๋ฆฌ
// nuxt.config.js
  build: {
    ...
    extractCSS: true,
    optimization: {
      splitChunks: {
        chunks: 'all',
        automaticNameDelimiter: '.',
        name: true,
        cacheGroups: {}
      }
    },
    splitChunks: {
      layouts: true
    }
  },
const SCROLL_TO_OPTION: ScrollToOptions = {
  top: 0,
  behavior: 'smooth'
}
window.scrollTo(SCROLL_TO_OPTION)
  • Vuex ๋‹ค๋ฅธ ๋ชจ๋“ˆ Action ์‚ฌ์šฉ
dispatch('auth/action', {...}, { root: true })
  • @nuxt/typescript-build
    • ๊ฒฝ์šฐ์— ๋”ฐ๋ผ ๋นŒ๋“œ ์‹œ lint ์ฒดํฌ ์•ˆ๋˜๋„๋ก ์ฒ˜๋ฆฌ
  buildModules: [
    [
      '@nuxt/typescript-build',
      {
        typeCheck: {
          eslint: IS_LOCAL
        },
        ignoreNotFoundWarnings: true
      }
    ]
  ],
  • error.vue, default.vue CSS ์ˆœ์„œ ํ™•์ธ