mirror of
https://github.com/Afilmory/afilmory
synced 2026-02-01 22:48:17 +00:00
chore: lazy import and saas build base url
Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
"build:prod:saas": "SAAS=1 vite build",
|
||||
"dev": "vite",
|
||||
"format": "prettier --write \"src/**/*.ts\" ",
|
||||
"lint": "eslint --fix",
|
||||
@@ -108,4 +109,4 @@
|
||||
"eslint --fix"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,9 @@ import { Outlet } from 'react-router'
|
||||
|
||||
import { Header } from '~/components/common/Header'
|
||||
|
||||
Object.entries(import.meta.glob('./**/*.tsx', { eager: false })).forEach(([_, importer]) => {
|
||||
importer()
|
||||
})
|
||||
export function Component() {
|
||||
return (
|
||||
<div className="flex h-screen flex-col">
|
||||
|
||||
@@ -16,7 +16,10 @@ import PKG from './package.json'
|
||||
|
||||
const ROOT = fileURLToPath(new URL('./', import.meta.url))
|
||||
|
||||
const isSaas = process.env.SAAS === '1'
|
||||
|
||||
export default defineConfig({
|
||||
base: isSaas ? 'https://static.afilmory.art/platform/' : '/',
|
||||
plugins: [
|
||||
codeInspectorPlugin({
|
||||
bundler: 'vite',
|
||||
|
||||
Reference in New Issue
Block a user