Global
Global configuration options can be found in config/initializers/svelte.rb
.
Options
Option with type | Description | Default |
---|---|---|
ssr : bool | Global server-side rendering. Does not override the ssr local or variants. | true |
aliases : Hash[Symbol, String] | Path aliases when importing from Svelte views. See Path aliases for more information. | {} |
preprocess : Hash[String | Symbol, String] | Configuration for svelte-preprocess | {} |
Example with Svelte.configure
Initializer
ruby
Svelte.configure do |config|
config.ssr = true
config.aliases = {
:$views => Rails.root.join("app", "views")
}
end