Skip to content

Commit

Permalink
fix(): fix tsconfig vite and vitest config
Browse files Browse the repository at this point in the history
  • Loading branch information
difernandez committed Jun 16, 2023
1 parent 394ad72 commit 5fb9c81
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
1 change: 0 additions & 1 deletion lib/potassium/assets/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"browser": true,
"es2021": true,
"node": true,
"vi": true,
"vue/setup-compiler-macros": true
},
"parserOptions": {
Expand Down
16 changes: 13 additions & 3 deletions lib/potassium/assets/tsconfig.config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"extends": "@vue/tsconfig/tsconfig.node.json",
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
"extends": [
"@tsconfig/node14/tsconfig.json",
"@vue/tsconfig/tsconfig.json"
],
"include": [
"vite.config.*",
"vitest.config.*",
"cypress.config.*",
"playwright.config.*"
],
"compilerOptions": {
"composite": true,
"types": ["node", "vitest/globals"]
"types": [
"node"
]
}
}
16 changes: 11 additions & 5 deletions lib/potassium/assets/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": ["env.d.ts", "app/**/*", "app/**/*.vue"],
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": [
"env.d.ts",
"app/**/*",
"app/**/*.vue"
],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./app/frontend/*"]
}
"@/*": [
"./app/frontend/*"
]
},
"types": ["vitest/globals", "vite/client"]
},

"references": [
{
"path": "./tsconfig.config.json"
Expand Down
1 change: 1 addition & 0 deletions lib/potassium/recipes/front_end_vite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Recipes::FrontEndVite < Rails::AppBuilder
"vue@#{VUE_VERSION}"
],
vue_dev: [
"@tsconfig/node14",
"@vitejs/plugin-vue",
"@vue/tsconfig",
"vue-tsc"
Expand Down

0 comments on commit 5fb9c81

Please sign in to comment.