From 177a620e724757d4f74edd45844bfa88a27b6232 Mon Sep 17 00:00:00 2001 From: Alexey Poimtsev Date: Fri, 21 Nov 2025 23:49:37 +0300 Subject: [PATCH] fix: copy svelte.config.js regardless of --example-page flag --- lib/generators/inertia/install/frameworks.yml | 1 - lib/generators/inertia/install/install_generator.rb | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/generators/inertia/install/frameworks.yml b/lib/generators/inertia/install/frameworks.yml index 1fe2aeef..7fdde8cf 100644 --- a/lib/generators/inertia/install/frameworks.yml +++ b/lib/generators/inertia/install/frameworks.yml @@ -76,7 +76,6 @@ svelte: copy_files_js: "InertiaExample.svelte": "%{js_destination_path}/pages/inertia_example/index.svelte" copy_files: - "svelte.config.js": "svelte.config.js" "../assets/svelte.svg": "%{js_destination_path}/assets/svelte.svg" "../assets/inertia.svg": "%{js_destination_path}/assets/inertia.svg" "../assets/vite_ruby.svg": "%{js_destination_path}/assets/vite_ruby.svg" diff --git a/lib/generators/inertia/install/install_generator.rb b/lib/generators/inertia/install/install_generator.rb index 137e4ee3..9964719f 100644 --- a/lib/generators/inertia/install/install_generator.rb +++ b/lib/generators/inertia/install/install_generator.rb @@ -101,6 +101,12 @@ def install_inertia say "Copying #{inertia_entrypoint} entrypoint" copy_file "#{framework}/#{inertia_entrypoint}", js_file_path("entrypoints/#{inertia_entrypoint}") + # Copy framework-specific config files + if svelte? + say 'Copying svelte.config.js' + copy_file 'svelte/svelte.config.js', file_path('svelte.config.js') + end + say 'Copying InertiaController' copy_file 'inertia_controller.rb', file_path('app/controllers/inertia_controller.rb')