CLEAR
This commit is contained in:
@@ -6,23 +6,17 @@ import pkgs from './package.json';
|
|||||||
import tailwindcss from '@tailwindcss/vite';
|
import tailwindcss from '@tailwindcss/vite';
|
||||||
|
|
||||||
const isDev = process.env.NODE_ENV === 'development';
|
const isDev = process.env.NODE_ENV === 'development';
|
||||||
const plugins = [tailwindcss()];
|
|
||||||
let target = process.env.VITE_API_URL || 'https://localhost:51015';
|
let target = process.env.VITE_API_URL || 'https://localhost:51015';
|
||||||
const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' };
|
const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' };
|
||||||
let proxy = {
|
let proxy = {
|
||||||
'/root/center/': {
|
'/root/': {
|
||||||
target: `${target}/root/center/`,
|
target: `${target}/root/`,
|
||||||
},
|
|
||||||
'/user/login/': {
|
|
||||||
target: `${target}/user/login/`,
|
|
||||||
},
|
},
|
||||||
'/api': apiProxy,
|
'/api': apiProxy,
|
||||||
'/client': apiProxy,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
// ...
|
|
||||||
// site: 'https://kevisual.xiongxiao.me/root/astro',
|
|
||||||
base: isDev ? undefined : pkgs.basename,
|
base: isDev ? undefined : pkgs.basename,
|
||||||
integrations: [
|
integrations: [
|
||||||
mdx(),
|
mdx(),
|
||||||
@@ -31,10 +25,7 @@ export default defineConfig({
|
|||||||
],
|
],
|
||||||
|
|
||||||
vite: {
|
vite: {
|
||||||
plugins,
|
plugins: [tailwindcss()],
|
||||||
define: {
|
|
||||||
BASE_NAME: JSON.stringify(pkgs.basename),
|
|
||||||
},
|
|
||||||
server: {
|
server: {
|
||||||
port: 7008,
|
port: 7008,
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
|
|||||||
Reference in New Issue
Block a user