Home

Issue: 2983

[BUG] build.watch doesn't handle `~`

[issue link]

Hi, if I watch a file by this way:

build: {
        watch: [
            '~/.env',
        ]
    },

the build will not reload.

If I do:

build: {
        watch: [
            resolve(process.cwd(), '.env')
        ]
    },

it works!

I’ll maybe make a PR, if I have time to.

This question is available on Nuxt.js community (#c2586)