nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Ignore `.DS_Store` files from public assets and compression

Open leosin opened this issue 2 years ago • 2 comments

Environment

nitro: 2.1.1 node: 18

Reproduction

image

 nitro: {
    compressPublicAssets: true, 
  },

Describe the bug

When the compression option is turned on, there will be .DS_Store.br and .DS_store.gz files in each directory after building.

Can this file be ignored by default?

or some option in config can exclude it.

Additional context

No response

Logs

No response

leosin avatar Feb 12 '23 18:02 leosin

.DS_Store is macOS-specific files and generated when you open directory through Finder. You should handle it manually and delete

dsfcoll avatar Feb 13 '23 19:02 dsfcoll

Generally, we should support ignore patterns for public directory (https://github.com/unjs/nitro/issues/843)

PR is welcome to add a hotfix to ignore this specific file from copying in public assets plugin.

pi0 avatar Feb 13 '23 21:02 pi0