Search code examples
javascriptnode.jsconfigurationejsbrowser-sync

Simple browsersync config doesn't work with asterisk match pattern


This code works fine (page is reloaded when I update index.ejs) :

module.exports = {
    "port": 3001,
    "proxy": "localhost:3000",
    "files": "src/components/static/views/index.ejs"
};

This code doesn't work (nothing happens) :

module.exports = {
    "port": 3001,
    "proxy": "localhost:3000",
    "files": "src/components/static/views/*.ejs"
};

Same result in a command line or in a config file.

"browser-sync": "^2.27.11"

Is it a known issue or I don't get something obvious ?


Solution

  • In fact, the name of my root folder had a space. It was causing the problem.

    I changed "My Project Name" to "MyProjectName" and it works, don't know really why.