Continuing the discussion from I don't know how to use Sage 11:
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: {
// has 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?