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