diff --git a/.eslintrc b/.eslintrc
index 160d793..569e242 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -42,9 +42,10 @@
"airbnb-typescript/base"
],
"rules": {
- "no-undef": "off"
- }
+ "no-undef": "off",
+ "@typescript-eslint/no-explicit-any": "off"
}
+ }
],
"rules": {
"import/prefer-default-export": "off"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d24cad..edf0c78 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,13 +2,19 @@
[1.1.2]: https://github.com/digikid/vite-vue-project/releases/tag/1.1.2
-## [1.1.2] - 2023-08-10
+## [1.1.2] - 2023-08-11
### Updates
-- Remove [line-clamp](https://github.com/tailwindlabs/tailwindcss-line-clamp) plugin (deprecated in Tailwind v3.3)
+- Move typing files to `src` folder
+- Update configuration files
- All dependencies updated to their latest versions
+### Remove
+
+- [line-clamp](https://github.com/tailwindlabs/tailwindcss-line-clamp) plugin (deprecated in Tailwind v3.3)
+- [vite-tsconfig-paths](https://www.npmjs.com/package/vite-tsconfig-paths) package
+
[1.1.1]: https://github.com/digikid/vite-vue-project/releases/tag/1.1.1
## [1.1.1] - 2022-08-28
diff --git a/package-lock.json b/package-lock.json
index 729a20a..fcad1ba 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6,7 +6,7 @@
"packages": {
"": {
"name": "vite-vue-project",
- "version": "1.1.1",
+ "version": "1.1.2",
"dependencies": {
"@headlessui/vue": "^1.7.15",
"vue": "^3.3.4"
@@ -32,7 +32,6 @@
"tailwindcss": "^3.3.3",
"typescript": "^5.1.6",
"vite": "^4.4.9",
- "vite-tsconfig-paths": "^4.2.0",
"vue-eslint-parser": "^9.3.1",
"vue-tsc": "^1.8.8"
}
@@ -3198,12 +3197,6 @@
"integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==",
"dev": true
},
- "node_modules/globrex": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
- "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==",
- "dev": true
- },
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
@@ -5521,26 +5514,6 @@
"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
"dev": true
},
- "node_modules/tsconfck": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-2.1.2.tgz",
- "integrity": "sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==",
- "dev": true,
- "bin": {
- "tsconfck": "bin/tsconfck.js"
- },
- "engines": {
- "node": "^14.13.1 || ^16 || >=18"
- },
- "peerDependencies": {
- "typescript": "^4.3.5 || ^5.0.0"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
"node_modules/tsconfig-paths": {
"version": "3.14.2",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz",
@@ -5802,25 +5775,6 @@
}
}
},
- "node_modules/vite-tsconfig-paths": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.2.0.tgz",
- "integrity": "sha512-jGpus0eUy5qbbMVGiTxCL1iB9ZGN6Bd37VGLJU39kTDD6ZfULTTb1bcc5IeTWqWJKiWV5YihCaibeASPiGi8kw==",
- "dev": true,
- "dependencies": {
- "debug": "^4.1.1",
- "globrex": "^0.1.2",
- "tsconfck": "^2.1.0"
- },
- "peerDependencies": {
- "vite": "*"
- },
- "peerDependenciesMeta": {
- "vite": {
- "optional": true
- }
- }
- },
"node_modules/vue": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.3.4.tgz",
diff --git a/package.json b/package.json
index ce73f0e..680af1a 100644
--- a/package.json
+++ b/package.json
@@ -32,7 +32,6 @@
"tailwindcss": "^3.3.3",
"typescript": "^5.1.6",
"vite": "^4.4.9",
- "vite-tsconfig-paths": "^4.2.0",
"vue-eslint-parser": "^9.3.1",
"vue-tsc": "^1.8.8"
}
diff --git a/postcss.config.js b/postcss.config.js
index e7ac16d..2e7af2b 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -1,10 +1,6 @@
-import tailwind from 'tailwindcss';
-import autoprefixer from 'autoprefixer';
-import tailwindConfig from './tailwind.config';
-
export default {
- plugins: [
- tailwind(tailwindConfig),
- autoprefixer
- ],
-};
+ plugins: {
+ tailwindcss: {},
+ autoprefixer: {},
+ },
+}
diff --git a/src/App.vue b/src/App.vue
index 18363aa..cc47fc5 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,5 +1,5 @@
diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue
index 1a97853..390c43a 100644
--- a/src/components/HelloWorld.vue
+++ b/src/components/HelloWorld.vue
@@ -26,7 +26,7 @@ const includes: string[][] = [
{{ title }}
-
+
Modern starter template for Vite using Vue and TypeScript
{{ include[1] }}
diff --git a/src/typings/global.d.ts b/src/global.d.ts
similarity index 100%
rename from src/typings/global.d.ts
rename to src/global.d.ts
diff --git a/src/main.ts b/src/main.ts
index 8ac8bed..053d492 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,8 +1,8 @@
import { createApp } from 'vue';
-import App from './App.vue';
+import App from '@/App.vue';
-import './main.css';
+import '@/main.css';
const app = createApp(App);
diff --git a/src/typings/vite-env.d.ts b/src/shims-vue.d.ts
similarity index 50%
rename from src/typings/vite-env.d.ts
rename to src/shims-vue.d.ts
index 51bdc47..4c39e51 100644
--- a/src/typings/vite-env.d.ts
+++ b/src/shims-vue.d.ts
@@ -1,9 +1,6 @@
-///
-
declare module '*.vue' {
import type { DefineComponent } from 'vue';
- const component: DefineComponent;
-
+ const component: DefineComponent, Record, any>;
export default component;
}
diff --git a/tailwind.config.js b/tailwind.config.js
index 5514675..c1c53e0 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -4,10 +4,11 @@ import aspectRatio from '@tailwindcss/aspect-ratio';
import defaultTheme from 'tailwindcss/defaultTheme';
+/** @type {import('tailwindcss').Config} */
export default {
content: [
- './index.html',
- './src/**/*.{vue,js,jsx,ts,tsx}',
+ "./index.html",
+ "./src/**/*.{vue,js,ts,jsx,tsx}",
],
theme: {
extend: {
@@ -23,5 +24,5 @@ export default {
forms,
typography,
aspectRatio
- ],
-};
+ ]
+}
diff --git a/tsconfig.json b/tsconfig.json
index 0ef3113..06d1326 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -15,23 +15,13 @@
"ESNext",
"DOM"
],
- "baseUrl": "src",
+ "baseUrl": ".",
"paths": {
- "@src/*": [
- "*"
- ],
- "@typings/*": [
- "typings/*"
- ],
- "@components/*": [
- "components/*"
- ]
+ "@/*": ["src/*"]
}
},
"include": [
- "src/**/*.ts",
- "src/**/*.tsx",
- "src/**/*.vue"
+ "src/**/*"
],
"references": [{
"path": "tsconfig.node.json"
diff --git a/vite.config.ts b/vite.config.ts
index f08b017..7371421 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,34 +1,16 @@
-import { defineConfig } from 'vite';
-import { resolve } from 'path';
-import { compilerOptions } from './tsconfig.json';
-
+import path from 'path';
import vue from '@vitejs/plugin-vue';
-import tsConfigPaths from 'vite-tsconfig-paths';
-import postcssConfig from './postcss.config.js';
-
-const { baseUrl, paths: aliases } = compilerOptions;
-
-const alias = Object.entries(aliases).reduce((acc, [key, [value]]) => {
- const [aliasKey, path] = [key, value].map(v => v.substring(0, v.length - 2));
- const aliasPath = resolve(__dirname, baseUrl, path);
-
- return {
- ...acc,
- [aliasKey]: aliasPath
- };
-}, {});
+import { defineConfig } from 'vite';
export default defineConfig({
plugins: [
- tsConfigPaths(),
vue()
],
resolve: {
- alias
- },
- css: {
- postcss: postcssConfig,
+ alias: {
+ '@': path.resolve(__dirname, 'src')
+ }
},
server: {
open: true,