Skip to content

Commit

Permalink
Merge pull request #3862 from Gnuk/launch-both-vite-and-tikui
Browse files Browse the repository at this point in the history
Launch both vite and tikui in dev mode
  • Loading branch information
DamnClin authored Oct 7, 2022
2 parents 7194bb4 + 3e30913 commit 1df6cff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"license": "Apache-2.0",
"scripts": {
"build": "vue-tsc -p tsconfig.build.json --noEmit && vite build --emptyOutDir && tikui-core build",
"dev": "vite",
"dev": "npm run tikui:serve & npm run webapp:serve",
"e2e": "cypress open --config-file src/test/javascript/cypress/cypress-config.ts",
"e2e:headless": "cypress run --headless --config-file src/test/javascript/cypress/cypress-config.ts",
"format": "prettier . --write",
Expand All @@ -36,11 +36,12 @@
"prettier:format": "npm run prettier:run -- --write",
"prettier:run": "prettier \"{{src/**/,}*.{md,json,yml,html,vue,java,xml},*.{js,ts},src/{main/glyph,main/webapp,test/javascript}/**/*.{css,scss}}\"",
"preview": "vite preview",
"start": "vite",
"start": "npm run dev",
"test": "npm run jest --",
"test:clear": "jest --clearCache",
"test:watch": "npm run jest -- --watch",
"tikui:serve": "tikui-core serve"
"tikui:serve": "tikui-core serve",
"webapp:serve": "vite"
},
"dependencies": {
"axios": "0.27.2",
Expand Down
1 change: 1 addition & 0 deletions tikuiconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"documentation": "tikui",
"src": "src/main/style",
"dist": "target/classes/public/style",
"port": 9005,
"expose": {
"src/main/glyph": "glyph"
}
Expand Down
10 changes: 8 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';
import * as path from 'path';

// https://vitejs.dev/config/
export default defineConfig({
Expand Down Expand Up @@ -33,7 +33,13 @@ export default defineConfig({
'/style': {
ws: true,
changeOrigin: true,
target: 'http://localhost:7471',
rewrite: path => path.replace(/^\/style/, ''),
target: 'http://localhost:9005',
},
'/reload': {
ws: true,
changeOrigin: true,
target: 'http://localhost:9005',
},
},
},
Expand Down

0 comments on commit 1df6cff

Please sign in to comment.