Skip to content

Commit

Permalink
vite
Browse files Browse the repository at this point in the history
  • Loading branch information
Atipat Pankong committed Jun 21, 2024
1 parent c13f8d1 commit 0677239
Show file tree
Hide file tree
Showing 7 changed files with 699 additions and 8,221 deletions.
12 changes: 12 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"root": true,
"env": {
"node": true,
"es2022": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {}
}
6 changes: 6 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"src/**/*.{js,vue}": [
"prettier --write",
"eslint --fix"
]
}
4 changes: 3 additions & 1 deletion public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<link rel="icon" href="/public/favicon.ico" />

<!-- HTML Meta Tags -->
<title>ku-table</title>
Expand Down Expand Up @@ -53,6 +53,8 @@
<strong>KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku</strong>
</noscript>
<div id="app"></div>

<script type="module" src="src/main.js"></script>
<!-- built files will be auto injected -->
<div id="divadsensedisplaynone">
<!-- put here all adsense code -->
Expand Down
41 changes: 9 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"version": "1.0.0",
"private": true,
"scripts": {
"serve": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve",
"build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build",
"lint": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service lint",
"dev": "NODE_OPTIONS=--openssl-legacy-provider vite",
"build": "NODE_OPTIONS=--openssl-legacy-provider vite build",
"serve": "NODE_OPTIONS=--openssl-legacy-provider vite preview",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
"prepare": "husky install",
"pre-commit": "lint-staged"
},
Expand All @@ -14,49 +15,25 @@
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/vue-fontawesome": "^3.0.5",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"k-progress-v3": "^1.0.0",
"regenerator-runtime": "^0.14.1",
"vue": "^3.3.9",
"vue-html2canvas": "^0.0.4",
"vue-router": "^4.2.5",
"vuex": "^4.1.0"
},
"devDependencies": {
"@tailwindcss/postcss7-compat": "^2.2.7",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vitejs/plugin-vue": "^5.0.5",
"autoprefixer": "9",
"babel-eslint": "^10.1.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^6.2.2",
"eslint": "8",
"eslint-plugin-vue": "8",
"husky": "^7.0.0",
"lint-staged": "^11.1.2",
"postcss": "7",
"prettier": "^2.3.2",
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
"vue-template-compiler": "^2.6.11"
},
"lint-staged": {
"src/**/*.{js,vue}": [
"prettier --write",
"eslint --fix"
]
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
"vite": "^5.3.1"
},
"browserslist": [
"> 1%",
Expand Down
2 changes: 1 addition & 1 deletion src/http.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios'

const axiosInstance = axios.create({
baseURL: process.env.VUE_APP_BASE_SERVER_URL,
baseURL: import.meta.env.VUE_APP_BASE_SERVER_URL,
})

const accessToken = localStorage.getItem('accessToken')
Expand Down
14 changes: 14 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
})
Loading

0 comments on commit 0677239

Please sign in to comment.