0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Nuxt.js v3 .nu​​xtignore で generate 時に生成させないファイルを指定する

Posted at

目的

デバッグ用のページを削除せずに、本番用のビルド時にhtmlを生成させない

使用ファイル

.nu​​xtignore を開発用(ファイルは未指定)とジェネレート用(除外したいファイルを指定)を用意する

.nu​​xtignore.local
.nu​​xtignore.prod
pages/debug/index.vue
package.json
{
  "scripts": {
    "dev": "cp .nuxtignore.local .nuxtignore && nuxt dev",
    "generate": "cp .nuxtignore.prod .nuxtignore && nuxt generate"
  },
.gitignore
.nu​​xtignore
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?