Skip to content

Commit

Permalink
Enable static build of the demo page.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-wu committed Feb 6, 2024
1 parent 7067c11 commit eb6346b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
},
"scripts": {
"serve": "vite --host",
"build": "vue-cli-service build --dest test_html --mode staging",
"build-bundle": "vite build",
"lint": "vue-cli-service lint",
"build-static": "vite build -c vite.static-build.js",
"release:beta": "npm version prerelease --preid=beta; npm publish --tag beta",
"release:minor": "npm version minor; npm publish",
"release:patch": "npm version patch; npm publish",
Expand Down
1 change: 1 addition & 0 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ declare module 'vue' {
export interface GlobalComponents {
AnnotationTool: typeof import('./components/AnnotationTool.vue')['default']
DynamicLegends: typeof import('./components/legends/DynamicLegends.vue')['default']
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
ElButton: typeof import('element-plus/es')['ElButton']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
Expand Down
12 changes: 12 additions & 0 deletions vite.static-build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'vite'
import rootConfig from './vite.config.js'

// defineWorkspace provides a nice type hinting DX
export default defineConfig((configEnv) => {
const config = rootConfig(configEnv);
config.build = {
outDir: "test-html"
};

return config;
})

0 comments on commit eb6346b

Please sign in to comment.