Hi !
I’m working on a Wordpress website with sage theme for the first time. I just install it and run the build :
yarn dev
yarn build
And the one or the other command line took a very long time to finish. I have to wait 60s to 1m30 ! I think I’ve done something wrong.
Here is my environnement:
OS : windows + WSL
Server : WAMP
Sage 10.2.0
Mode development
@roots/bud 6.3.3
webpack 5.73.0
node 16.16.0
My package.json :
{
"name": "sage",
"private": true,
"browserslist": [
"extends @roots/browserslist-config/current"
],
"engines": {
"node": ">=16.0.0"
},
"scripts": {
"dev": "bud dev",
"build": "bud build",
"translate": "yarn translate:pot && yarn translate:update",
"translate:pot": "wp i18n make-pot . ./resources/lang/sage.pot --include=\"app,resources\"",
"translate:update": "for filename in ./resources/lang/*.po; do msgmerge -U $filename ./resources/lang/sage.pot; done; rm -f ./resources/lang/*.po~",
"translate:compile": "yarn translate:mo && yarn translate:js",
"translate:js": "wp i18n make-json ./resources/lang --pretty-print",
"translate:mo": "wp i18n make-mo ./resources/lang ./resources/lang"
},
"devDependencies": {
"@roots/bud": "6.3.3",
"@roots/bud-sass": "^6.3.5",
"@roots/sage": "6.3.3"
}
}
My bud.config.mjs
// @ts-check
/**
* Build configuration
*
* @see {@link https://bud.js.org/guides/getting-started/configure}
* @param {import('@roots/bud').Bud} app
*/
export default async (app) => {
app
/**
* Application entrypoints
*/
.entry({
app: ["@scripts/app", "@styles/app"]
})
/**
* Directory contents to be included in the compilation
*/
.assets(["images"])
/**
* Matched files trigger a page reload when modified
*/
.watch(["resources/views/**/*", "app/**/*", 'resources/styles/*', 'resources/scripts/*'])
/**
* Proxy origin (`WP_HOME`)
*/
.proxy("http://sage.local")
/**
* Development origin
*/
.serve("http://sage")
/**
* URI of the `public` directory
*/
.setPublicPath("/app/themes/sage/public/");
};
If you have some hint to speed up my build, it will be amazing !
I saw on the doc that there is a
yarn start
command that just compile the scss and js, that would be great. But it return this error : error Command “start” not found.
Thank for all the help you can get me