mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-25 07:04:11 +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
|
||||
|
||||
- name: build
|
||||
env:
|
||||
PUBLIC_PATH: /metacubexd
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm build
|
||||
|
@ -22,7 +22,10 @@ export const App = () => {
|
||||
})
|
||||
|
||||
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">
|
||||
<Show when={location.pathname !== '/setup'}>
|
||||
<Header />
|
||||
|
@ -2,9 +2,3 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@tailwind variants;
|
||||
|
||||
.app {
|
||||
min-height: 100vh;
|
||||
padding: 1rem;
|
||||
@apply subpixel-antialiased;
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
import '~/index.css'
|
||||
|
||||
/* @refresh reload */
|
||||
import 'solid-devtools'
|
||||
import { render } from 'solid-js/web'
|
||||
|
||||
import { Router, hashIntegration } from '@solidjs/router'
|
||||
import { App } from './App'
|
||||
import './index.css'
|
||||
|
||||
const root = document.getElementById('root')
|
||||
|
||||
|
@ -3,6 +3,7 @@ import { defineConfig } from 'vite'
|
||||
import solidPlugin from 'vite-plugin-solid'
|
||||
|
||||
export default defineConfig({
|
||||
base: process.env.PUBLIC_PATH || '/',
|
||||
resolve: {
|
||||
alias: {
|
||||
'~': '/src',
|
||||
|
Loading…
x
Reference in New Issue
Block a user