1

I'm trying to develop a Wordpress Theme with Wordpress and Roots Sage. In my Theme folder i installed sage with

composer create-project roots/sage my-theme

After i entered all configuration I tried to start the development build with yarn start which invokes webpack --hide-modules --watch --config resources/assets/build/webpack.config.js.

Browsersync then gives me:

[BS] [HTML Injector] Running...
[Browsersync] Proxying: http://test.local
[Browsersync] Access URLs:
 ----------------------------------------
       Local: http://localhost:3000
    External: http://xxx:3000
 ----------------------------------------
          UI: http://localhost:3001
 UI External: http://xxx:3001
 ----------------------------------------
[Browsersync] Watching files...

A browsertab opens, however there is no response in any form. The page just keeps loading.

Webpack config (resources/assets/build/webpack.config.js) is

{
  "entry": {
    "main": [
      "./scripts/main.js",
      "./styles/main.scss"
    ],
    "customizer": [
      "./scripts/customizer.js"
    ]
  },
  "publicPath": "/wp-content/themes/my-theme",
  "devUrl": "http://test.local",
  "proxyUrl": "http://localhost:3000",
  "cacheBusting": "[name]_[hash:8]",
  "watch": [
    "app/**/*.php",
    "config/**/*.php",
    "resources/views/**/*.php"
  ]
}

Any ideas? Thanks!

polyte
  • 449
  • 2
  • 13

1 Answers1

0

There are several options:

  • Make sure your local environment works - if you go directly to http://test.local the site should work correctly.

  • Make sure localhost pointed to 127.0.0.1 on hosts file

  • Make sure port 3000 is not blocked or already in used.

  • Also on sage 9, configuration file located at resources/asses/config.json