Skip to content

Commit 16375fb

Browse files
authored
feat: create vite-plugin-rails, an opinionated version of vite-plugin-ruby (#282)
1 parent 0881504 commit 16375fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+5411
-290
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ module.exports = {
22
extends: ['@mussi/eslint-config'],
33
rules: {
44
'react/react-in-jsx-scope': 'off',
5+
'import/named': 'off',
56
},
67
}

docs/src/guide/plugins.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ Check the [example app] for a sample setup with most of them.
2727
When using Vue, React, or Svelte, check out [Vite][plugins]'s __[official plugins][plugins]__.
2828
:::
2929

30+
## [Rails](https://github.com/ElMassimo/vite_ruby/tree/main/vite-plugin-rails)
31+
32+
Use <kbd>[vite-plugin-rails]</kbd> to pre-configure most of the recommended plugins in your application.
33+
34+
In the future, `vite_rails` might install this plugin by default.
35+
36+
```ts
37+
plugins: [
38+
Rails({
39+
envVars: { RAILS_ENV: 'development' },
40+
}),
41+
],
42+
```
43+
44+
::: tip
45+
You can opt-out and use `vite-plugin-ruby` instead, manually adding only the plugins you need.
46+
:::
47+
48+
3049
## [Environment](https://github.com/ElMassimo/vite-plugin-environment)
3150

3251
Use <kbd>[vite-plugin-environment]</kbd> to expose environment variables to your

0 commit comments

Comments
 (0)