From 667c070dd6d370e8037278bf2779c30685027d17 Mon Sep 17 00:00:00 2001 From: xuxb Date: Fri, 7 Jul 2023 09:45:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E6=88=90cesium+vite-plugin-earth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 22 ++++++++++++++++++++++ src/App.vue | 19 +++++++++++++++++++ src/main.ts | 5 +++++ vite.config.ts | 8 ++++++++ 4 files changed, 54 insertions(+) create mode 100644 package.json create mode 100644 src/App.vue create mode 100644 src/main.ts create mode 100644 vite.config.ts diff --git a/package.json b/package.json new file mode 100644 index 0000000..4e2a902 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "vite-cesium-sandbox", + "private": true, + "version": "1.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vue-tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "cesium": "^1.107.0", + "vue": "^3.2.47" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^4.1.0", + "typescript": "^5.0.2", + "vite": "^4.3.9", + "vite-plugin-earth": "^2.1.2", + "vue-tsc": "^1.4.2" + } +} diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..89028b1 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..2425c0f --- /dev/null +++ b/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import './style.css' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..60e08c9 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from 'vite'; +import vue from '@vitejs/plugin-vue'; +import { cesiumPlugin } from 'vite-plugin-earth'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [vue(), cesiumPlugin()] +});