Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbccce445b |
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "client",
|
||||
"private": true,
|
||||
"version": "3.6.1",
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
+10
-3
@@ -3,19 +3,26 @@ import react from "@vitejs/plugin-react";
|
||||
import svgr from "vite-plugin-svgr";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { readFileSync } from "fs";
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
export default defineConfig(({}) => {
|
||||
const pkg = JSON.parse(readFileSync(path.resolve(__dirname, "package.json"), "utf-8"));
|
||||
const version = pkg.version;
|
||||
let version = "3.6.1";
|
||||
|
||||
const allowedHosts = process.env.VITE_ALLOWED_HOSTS
|
||||
? process.env.VITE_ALLOWED_HOSTS.split(",").map((h) => h.trim())
|
||||
: true;
|
||||
|
||||
return {
|
||||
base: "/",
|
||||
plugins: [svgr(), react()],
|
||||
server: {
|
||||
host: true,
|
||||
allowedHosts,
|
||||
},
|
||||
preview: {
|
||||
host: true,
|
||||
allowedHosts,
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Reference in new issue
Block a user