Skip to content

Need help configuring vite with a rails application that lives in a nested path. #554

Closed Answered by ravi-bhusal-mg
ravi-bhusal-mg asked this question in Q&A
Discussion options

You must be logged in to vote

So the following config works for vite.

vite.json

  {
    "all": {
      "sourceCodeDir": "app/javascript",
      "watchAdditionalPaths": [],
      "publicOutputDir": "myapp/vite"
    },
    "development": {
      "autoBuild": true,
      "publicOutputDir": "myapp/vite-dev",
      "port": 3036
    },
    "test": {
      "autoBuild": true,
      "publicOutputDir": "myapp/vite-test",
      "port": 3037
    }
  }

vite.config

import { defineConfig } from 'vite'
import RubyPlugin from 'vite-plugin-ruby'

export default defineConfig({
  plugins: [
    RubyPlugin(),
  ],
  base: '',
})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ravi-bhusal-mg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant