Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] build.watch doesn't handle ~ #2983

Closed
mathieutu opened this issue Mar 9, 2018 · 6 comments
Closed

[BUG] build.watch doesn't handle ~ #2983

mathieutu opened this issue Mar 9, 2018 · 6 comments
Labels
Projects

Comments

@mathieutu
Copy link

mathieutu commented Mar 9, 2018

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)
@mootari
Copy link

mootari commented Mar 17, 2018

Noticed this myself. Watched paths are only passed through upath's normalizeSafe() function, not Nuxt.resolveAlias().
Note that paths are resolved relative to the cwd, so watch: ['.env'] should work as well.

@mathieutu
Copy link
Author

Hum.. Or not. This was not a question but a notice for a future PR. Please @CMTY reopen!

@mootari
Copy link

mootari commented Aug 12, 2018

@mathieutu Did you mark my response as answer on cmty.app? If so, can't you unmark it?

@nuxt nuxt deleted a comment Aug 13, 2018
@Atinux
Copy link
Member

Atinux commented Aug 13, 2018

Updated :)

@Atinux Atinux added this to Open in Bugs 🐞 via automation Aug 13, 2018
@mootari
Copy link

mootari commented Aug 13, 2018

@Atinux It's still marked as closed though. :)

@clarkdo clarkdo moved this from Open to Fixed in Bugs 🐞 Aug 21, 2018
@lock
Copy link

lock bot commented Nov 1, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 1, 2018
@danielroe danielroe added the 2.x label Jan 18, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects
Bugs 🐞
  
Fixed
Development

No branches or pull requests

4 participants