Skip to content

Commit

Permalink
Use ts for config
Browse files Browse the repository at this point in the history
Simplify alias
Remove unneeded packages
  • Loading branch information
BryceMehring committed Dec 29, 2022
1 parent 265f4b6 commit d901e4b
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 34 deletions.
72 changes: 53 additions & 19 deletions package-lock.json

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

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@
"prebuild": "npm run verify",
"build": "vite build",
"serve": "vite preview",
"lint": "eslint source/"
"lint": "eslint source/ vite.config.ts"
},
"dependencies": {
"three": "~0.148.0"
},
"devDependencies": {
"@types/node": "^18.11.18",
"@types/three": "^0.146.0",
"@typescript-eslint/eslint-plugin": "^5.36.1",
"@typescript-eslint/parser": "^5.36.1",
"eslint": "^8.23.0",
"lodash": "^4.17.21",
"postcss": "^8.3.6",
"sass": "^1.38.2",
"typescript": "~4.9.3",
"vite": "^4.0.3"
},
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/* Modules */
"module": "ES2022", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
Expand Down Expand Up @@ -105,6 +105,7 @@
"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"include": [
"source/**/*.ts"
"source/**/*.ts",
"./vite.config.ts",
]
}
13 changes: 4 additions & 9 deletions vite.config.js → vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@ export default defineConfig({
format: 'es',
},
resolve: {
alias: [
{
find: '@stylesheet',
replacement: resolve('./assets/stylesheets/'),
}, {
find: '@image',
replacement: resolve('./assets/images/'),
}
]
alias: {
'@stylesheet': resolve('./assets/stylesheets/'),
'@image': resolve('./assets/images/'),
},
},
});

0 comments on commit d901e4b

Please sign in to comment.