Sha256: 7cde8da0704cee3e84ca2e6cb087b8c40bd5a6be8007be66ad9ec29dd819da4d
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
Contents
Rails.application.config.middleware.insert_before 0, ViteRb ViteRb.configure do |vite| # Where to build snowpack to (out dir) vite.build_dir = "public" # url to use for assets IE: /vite/xyz.css, gets built to public/frontend vite.output_dir = "vite" # Where to find the config directory vite.config_path = Rails.root.join("config", "vite") vite.mount_path = Rails.root.join("app", "vite") vite.manifest_file = Rails.root.join(vite.build_dir, vite.output_dir, "manifest.json") # Where to find the snowpack config file vite.config_file = File.join(vite.config_path, "vite.config.js") # Where to find the postcss config file vite.postcss_config_file = File.join(vite.config_path, "postcss.config.js") # Where to find your snowpack files vite.entrypoints_dir = "entrypoints" # What port to run vite with vite.port = "4035" # What hostname to use vite.hostname = "localhost" # Whether or not to use https # https://www.snowpack.dev/#https%2Fhttp2 vite.https = false end ActiveSupport.on_load :action_controller do ActionController::Base.helper ViteRb end ActiveSupport.on_load :action_view do include ViteRb end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vite_rb-0.0.1.alpha1 | examples/rails-without-webpack/config/initializers/snowpacker.rb |