mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
add app
This commit is contained in:
1 parent
5f36f732b1
commit
7216158053
5 files changed
+421
-327
No files matched your search
+5
-2
@@ -34,10 +34,13 @@
|
|||||||
"xterm-addon-fit": "^0.7.0"
|
"xterm-addon-fit": "^0.7.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^4.2.3",
|
"@vitejs/plugin-vue": "^4.5.2",
|
||||||
|
"@vue/compiler-sfc": "^3.3.13",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.31",
|
||||||
"tailwindcss": "^3.3.3",
|
"tailwindcss": "^3.3.3",
|
||||||
"vite": "^4.5.2"
|
"vite": "^4.5.2",
|
||||||
|
"typescript": "^5.3.3",
|
||||||
|
"vue-tsc": "^1.8.25"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { defineConfig } from 'vite'
|
|
||||||
import vue from '@vitejs/plugin-vue'
|
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [vue()],
|
|
||||||
server: {
|
|
||||||
proxy: {
|
|
||||||
'/api': {
|
|
||||||
target: process.env.API_TARGET || 'http://localhost:3000',
|
|
||||||
changeOrigin: false,
|
|
||||||
xfwd: true,
|
|
||||||
},
|
|
||||||
'/socket.io': {
|
|
||||||
target: process.env.API_TARGET || 'ws://localhost:3000',
|
|
||||||
changeOrigin: false,
|
|
||||||
ws: true,
|
|
||||||
xfwd: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
"exports": "./dist/index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
import fs from 'fs'
|
|
||||||
import path from 'path'
|
|
||||||
|
|
||||||
function addJsExtension(filePath) {
|
|
||||||
if (fs.statSync(filePath).isDirectory()) {
|
|
||||||
for (const child of fs.readdirSync(filePath)) {
|
|
||||||
addJsExtension(path.join(filePath, child))
|
|
||||||
}
|
|
||||||
} else if (filePath.endsWith('.js')) {
|
|
||||||
let content = fs.readFileSync(filePath, 'utf8')
|
|
||||||
content = content.replace(/from\s+["']([^"']+)["']/g, (match, group1) => {
|
|
||||||
if (!group1.match(/^[./]|http|https/)) return match // Skip node_modules
|
|
||||||
if (!group1.endsWith('.js')) return `from "${group1}.js"`
|
|
||||||
return match
|
|
||||||
})
|
|
||||||
fs.writeFileSync(filePath, content, 'utf8')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
addJsExtension('./dist')
|
|
||||||
Reference in new issue
Block a user