Skip to content

Commit

Permalink
refactor (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
chad11111 authored Jul 18, 2023
1 parent 5740c71 commit 557cb81
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 28 deletions.
44 changes: 20 additions & 24 deletions dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"react-modern-drawer": "^1.2.0",
"react-router-dom": "^6.9.0",
"react-select": "^5.7.3",
"swagger-ui-react": "^5.1.1"
"swagger-ui-react": "^5.1.1",
"vite-plugin-static-copy": "^0.17.0"
},
"devDependencies": {
"@babel/core": "^7.21.0",
Expand Down
File renamed without changes.
File renamed without changes
2 changes: 1 addition & 1 deletion dashboard/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src", "public/static", ".storybook/**/*.ts"],
"include": ["src", "public/static", ".storybook/**/*.ts", "public/analytics.js"],
"references": [{ "path": "./tsconfig.node.json" }]
}
17 changes: 16 additions & 1 deletion dashboard/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import { viteStaticCopy } from 'vite-plugin-static-copy';

export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
const port = env.VITE_SERVER_PORT || 8080;
return {
plugins: [react()],
plugins: [
react(),
viteStaticCopy({
targets: [
{
src: 'public/analytics.js',
dest: "assets/",
},
{
src: 'public/logo.svg',
dest: "assets/",
},
]
})
],
build: {
assetsDir: "./assets/",
outDir: "../pkg/frontend/dist",
Expand Down
12 changes: 11 additions & 1 deletion dashboard/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4702,7 +4702,7 @@
"resolved" "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz"
"version" "3.1.3"

"fast-glob@^3.2.12", "fast-glob@^3.2.9":
"fast-glob@^3.2.11", "fast-glob@^3.2.12", "fast-glob@^3.2.9":
"integrity" "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w=="
"resolved" "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz"
"version" "3.2.12"
Expand Down Expand Up @@ -9153,6 +9153,16 @@
"resolved" "https://registry.npmjs.org/vite-plugin-html-config/-/vite-plugin-html-config-1.0.11.tgz"
"version" "1.0.11"

"vite-plugin-static-copy@^0.17.0":
"integrity" "sha512-2HpNbHfDt8SDy393AGXh9llHkc8FJMQkI8s3T5WsH3SWLMO+f5cFIyPErl4yGKU9Uh3Vaqsd4lHZYTf042fQ2A=="
"resolved" "https://registry.npmjs.org/vite-plugin-static-copy/-/vite-plugin-static-copy-0.17.0.tgz"
"version" "0.17.0"
dependencies:
"chokidar" "^3.5.3"
"fast-glob" "^3.2.11"
"fs-extra" "^11.1.0"
"picocolors" "^1.0.0"

"vite@^4.1.0":
"integrity" "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg=="
"resolved" "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz"
Expand Down

0 comments on commit 557cb81

Please sign in to comment.