I don't know how to use Sage 11

I started to work in Sage 11 and the documentation isn’t clear.

I am having trouble setting up the templates.

I follow these steps as outlined, Installing Sage | Sage Docs | Roots

But I only get a Laravel Holding page that I can’t locate in the template files.

Any help would be appreciated.

Do you have a local PHP environment? You’d visit the hostname like example.test as you would with other projects– not the Vite dev server.

hot reload with Vite automatically works when visiting the normal host name. are you seeing the stylesheet load in the network tab?

Ok, I got it - it’s working now.

I had to leave the base as the default.

1 Like

Update on this, I had to change the base path to my theme.

base: '/wp-content/themes/{my_theme}/public/build'

does this work when you do npm run build? I get this error when activating the theme/accessing the site and for the life of me, i cant figure out why.

// the boilerplate that composer create-project roots/sage provides
export default defineConfig({
base: ‘/wp-content/themes/[theme_name]/public/build/’,//‘/app/themes/sage/public/build/’,
plugins: [
tailwindcss(),
laravel({
input: [
‘resources/css/app.css’,
‘resources/js/app.js’,
‘resources/css/editor.css’,
‘resources/js/editor.js’,
],
refresh: true,
}),

wordpressPlugin(),

// Generate the theme.json file in the public/build/assets directory
// based on the Tailwind config and the theme.json file from base theme folder
wordpressThemeJson({
  disableTailwindColors: false,
  disableTailwindFonts: false,
  disableTailwindFontSizes: false,
}),

],
resolve: {
alias: {
// contains at symbol
‘scripts’: ‘/resources/js’,
‘styles’: ‘/resources/css’,
‘fonts’: ‘/resources/fonts’,
‘images’: ‘/resources/images’,
},
},
})

When I do npm run dev, the homepage loads and i can do development just fine but my concern is that when i need to deploy it on a wordpress hosted site, it will give this same error.

I do see that it is trying to look for a manifest.json file under public when the manifest.json is under build. I had already tried updating the base to …/public/ and rebuild but it still generates the same file structure in build and the exact same content in manifest.json and all the other files in assets. The docs doesnt provide much information and most examples i see uses v10 with bud.config.js. Any ideas?