【发布时间】:2019-04-30 15:57:30
【问题描述】:
我正在尝试使用 Wordpress 和 Roots Sage 开发一个 Wordpress 主题。 在我的主题文件夹中,我安装了 sage
composer create-project roots/sage my-theme
输入所有配置后,我尝试使用yarn start 启动开发构建,它调用webpack --hide-modules --watch --config resources/assets/build/webpack.config.js。
Browsersync 然后给我:
[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...
浏览器选项卡打开,但没有任何形式的响应。页面一直在加载。
Webpack 配置 (resources/assets/build/webpack.config.js) 是
{
"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"
]
}
有什么想法吗? 谢谢!
【问题讨论】:
标签: wordpress webpack browser-sync roots-sage