Skip to content

Commit

Permalink
Added config to Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
yatish27 committed Apr 19, 2024
1 parent 5cf77e4 commit 2d83529
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ group :development do
gem "rubocop-performance", require: false
gem "rubocop-rails", ">= 2.22.0", require: false
gem "web-console"
gem "foreman", "~> 0.88.1"
end

gem "foreman", "~> 0.88.1"
2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ end

Dir.chdir(File.expand_path("..", __dir__)) do
setup!
end
end
22 changes: 22 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { defineConfig } from "vite";
import { resolve } from "path";
import ViteRails from "vite-plugin-rails";

export default defineConfig({
plugins: [
ViteRails({
envVars: { RAILS_ENV: "development" },
envOptions: { defineOn: "import.meta.env" },
fullReload: {
additionalPaths: ["config/routes.rb", "app/views/**/*"],
delay: 300,
},
}),
],
build: { sourcemap: false },
resolve: {
alias: {
"@assets": resolve(__dirname, "app/frontend"),
},
},
});
14 changes: 0 additions & 14 deletions vite.config.ts

This file was deleted.

0 comments on commit 2d83529

Please sign in to comment.