I’m trying to change the “public” folder to “public_html” in Laravel 11 Vite.
With Webpack.mix it was a easy task but with Vite I can’t seem to make it work.
Isn’t this possible in Vite without a symlink or am I missing something?
vite.config.js:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
build: {
outDir: 'public_html/build',
},
plugins: [
laravel({
input: ['resources/sass/app.scss', 'resources/js/app.js'],
publicDirectory: 'public_html',
refresh: true,
}),
],
});
AppServiceProvider.php:
public function register(): void
{
# Change public/ to public_html/
$this->app->bind('path.public', function() {
return realpath(base_path().'/public_html');
});
}
Edit:
The error I receive is:
´´´ Vite manifest not found at: C:wamp64wwwdemopublicbuild/manifest.json ´´´