mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-26 07:24:10 +08:00
build: customize base url via PUBLIC_PATH environment variable
This commit is contained in:
parent
b9ab6a9244
commit
a92f18fd19
2
.github/workflows/publish-gh-pages.yml
vendored
2
.github/workflows/publish-gh-pages.yml
vendored
@ -21,6 +21,8 @@ jobs:
|
|||||||
node-version: latest
|
node-version: latest
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
|
env:
|
||||||
|
PUBLIC_PATH: /metacubexd
|
||||||
run: |
|
run: |
|
||||||
pnpm install
|
pnpm install
|
||||||
pnpm build
|
pnpm build
|
||||||
|
@ -22,7 +22,10 @@ export const App = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="app relative" data-theme={curTheme()}>
|
<div
|
||||||
|
class="relative min-h-screen p-4 subpixel-antialiased"
|
||||||
|
data-theme={curTheme()}
|
||||||
|
>
|
||||||
<div class="sticky inset-x-0 top-0 z-50 flex items-center rounded-md bg-base-200 px-4 py-2">
|
<div class="sticky inset-x-0 top-0 z-50 flex items-center rounded-md bg-base-200 px-4 py-2">
|
||||||
<Show when={location.pathname !== '/setup'}>
|
<Show when={location.pathname !== '/setup'}>
|
||||||
<Header />
|
<Header />
|
||||||
|
@ -2,9 +2,3 @@
|
|||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
@tailwind variants;
|
@tailwind variants;
|
||||||
|
|
||||||
.app {
|
|
||||||
min-height: 100vh;
|
|
||||||
padding: 1rem;
|
|
||||||
@apply subpixel-antialiased;
|
|
||||||
}
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
|
import '~/index.css'
|
||||||
|
|
||||||
/* @refresh reload */
|
/* @refresh reload */
|
||||||
import 'solid-devtools'
|
import 'solid-devtools'
|
||||||
import { render } from 'solid-js/web'
|
import { render } from 'solid-js/web'
|
||||||
|
|
||||||
import { Router, hashIntegration } from '@solidjs/router'
|
import { Router, hashIntegration } from '@solidjs/router'
|
||||||
import { App } from './App'
|
import { App } from './App'
|
||||||
import './index.css'
|
|
||||||
|
|
||||||
const root = document.getElementById('root')
|
const root = document.getElementById('root')
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ import { defineConfig } from 'vite'
|
|||||||
import solidPlugin from 'vite-plugin-solid'
|
import solidPlugin from 'vite-plugin-solid'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
base: process.env.PUBLIC_PATH || '/',
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'~': '/src',
|
'~': '/src',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user