Skip to content

Commit

Permalink
Upgrade vite-plugin-windicss (version that added root)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElMassimo committed Mar 5, 2021
1 parent ec81be9 commit 608db80
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bin/live
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

RAILS_ENV=production bin/rake assets:clobber
RAILS_ENV=production bin/rake vite:clobber
bin/assets
bin/serve
1 change: 1 addition & 0 deletions config/vite.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"all": {
"devServerConnectTimeout": 0.01,
"sourceCodeDir": "app/javascript",
"watchAdditionalPaths": []
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"sass": "^1.32.6",
"vite": "^2.0.5",
"vite-plugin-ruby": "^1.0.15",
"vite-plugin-windicss": "^0.6.4",
"vite-plugin-windicss": "^0.6.6",
"vite-plugin-vue2": "^1.2.0"
},
"resolutions": {
Expand Down
6 changes: 1 addition & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
import path from 'path'
import { defineConfig } from 'vite'

import { createVuePlugin as Vue2Plugin } from 'vite-plugin-vue2'
import RubyPlugin from 'vite-plugin-ruby'
import WindiCSS from 'vite-plugin-windicss'

const resolve = (file) => path.resolve(process.cwd(), file)

export default defineConfig({
plugins: [
RubyPlugin(),
Vue2Plugin(),
WindiCSS({
root: process.cwd(),
config: resolve('windi.config.ts'),
scan: {
fileExtensions: ['erb', 'html', 'vue', 'rb', 'jsx', 'tsx'],
dirs: ['app/views', 'app/helpers', 'app/javascript'].map(resolve),
dirs: ['app/views', 'app/helpers', 'app/javascript'],
},
}),
],
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 608db80

Please sign in to comment.