Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4623

Why is hot reloading not working in Vite + Rails?

$
0
0

I created a rails app, and installed vite_rails gem. My typescript is in app/frontend folder.

However, hot reloading when I save a TS file is not working.

I also tried by installing vite-plugin-full-reload NPM package. This is my config for vite:

// vite.config.tsimport { fileURLToPath, URL } from 'node:url'import { defineConfig } from 'vite'import FullReload from 'vite-plugin-full-reload'import RubyPlugin from 'vite-plugin-ruby'import vue from '@vitejs/plugin-vue'export default defineConfig({  plugins: [    RubyPlugin(),    vue(),    FullReload(['config/routes.rb', 'app/views/**/*', 'app/frontend/**/*']),  ],  resolve: {    alias: {'@': fileURLToPath(new URL('./app/frontend/internal', import.meta.url)),    },  },})

Still not reloading, why?


Viewing all articles
Browse latest Browse all 4623


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>