mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-19 12:22:00 +02:00
Fixed Vite production builds
This commit is contained in:
@@ -19,10 +19,11 @@ return [
|
||||
/** Path definitions */
|
||||
'base_path' => dirname(__DIR__, 2),
|
||||
'app_path' => dirname(__DIR__),
|
||||
'assets_path' => string('{app_path}/assets'),
|
||||
'cache_path' => string('{app_path}/cache'),
|
||||
'config_path' => string('{app_path}/config'),
|
||||
'files_path' => env('FILES_PATH', get('base_path')),
|
||||
'manifest_path' => string('{app_path}/manifest.json'),
|
||||
'manifest_path' => string('{assets_path}/manifest.json'),
|
||||
'source_path' => string('{app_path}/src'),
|
||||
'translations_path' => string('{app_path}/translations'),
|
||||
'views_path' => string('{app_path}/views'),
|
||||
|
@@ -35,8 +35,8 @@ class Vite extends ViewFunction
|
||||
|
||||
return Collection::make($assets)->map(
|
||||
static fn (string $asset): string => match (mb_substr($asset, (int) mb_strrpos($asset, '.'))) {
|
||||
'.js' => sprintf('<script type="module" src="app/%s"></script>', $manifest->{$asset}->file),
|
||||
'.css' => sprintf('<link rel="stylesheet" href="app/%s">', $manifest->{$asset}->file),
|
||||
'.js' => sprintf('<script type="module" src="%s"></script>', $manifest->{$asset}->file),
|
||||
'.css' => sprintf('<link rel="stylesheet" href="%s">', $manifest->{$asset}->file),
|
||||
default => throw new UnexpectedValueException(sprintf('Unsupported asset type: %s', $asset))
|
||||
}
|
||||
);
|
||||
|
@@ -4,9 +4,10 @@ import tailwindcss from '@tailwindcss/vite'
|
||||
export default defineConfig(({ command }) => {
|
||||
return {
|
||||
build: {
|
||||
outDir: 'app',
|
||||
outDir: '.',
|
||||
emptyOutDir: false,
|
||||
manifest: 'manifest.json',
|
||||
assetsDir: 'app/assets',
|
||||
manifest: 'app/assets/manifest.json',
|
||||
rollupOptions: {
|
||||
input: [
|
||||
'app/resources/css/app.css',
|
||||
|
Reference in New Issue
Block a user