Update more things

This commit is contained in:
billsonnn 2024-03-26 22:47:58 -04:00
parent e1cc0cd8c5
commit 029181ee04
3 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root" class="w-100 h-100"></div> <div id="root" class="w-100 h-100"></div>
<script> <script>
const NitroConfig = { window.NitroConfig = {
"config.urls": [ '/renderer-config.json', '/ui-config.json' ], "config.urls": [ '/renderer-config.json', '/ui-config.json' ],
"socket.url": (new URLSearchParams(window.location.search).get('socket.url') || null), "socket.url": (new URLSearchParams(window.location.search).get('socket.url') || null),
"sso.ticket": (new URLSearchParams(window.location.search).get('sso') || null), "sso.ticket": (new URLSearchParams(window.location.search).get('sso') || null),

View File

@ -20,15 +20,15 @@ export const App: FC<{}> = props =>
{ {
try try
{ {
//@ts-ignore if(!window.NitroConfig) throw new Error('NitroConfig is not defined!');
if(!NitroConfig) throw new Error('NitroConfig is not defined!');
const renderer = await PrepareRenderer({ const renderer = await PrepareRenderer({
width, width,
height, height,
autoDensity: true, autoDensity: true,
backgroundAlpha: 0, backgroundAlpha: 0,
preference: 'webgl' preference: 'webgl',
resolution: window.devicePixelRatio
}); });
GetTicker().add(ticker => renderer.render(GetStage())); GetTicker().add(ticker => renderer.render(GetStage()));

View File

@ -13,6 +13,7 @@ export default defineConfig({
}, },
build: { build: {
assetsInlineLimit: 102400, assetsInlineLimit: 102400,
chunkSizeWarningLimit: 200000,
rollupOptions: { rollupOptions: {
output: { output: {
assetFileNames: 'src/assets/[name].[ext]', assetFileNames: 'src/assets/[name].[ext]',
@ -20,7 +21,6 @@ export default defineConfig({
{ {
if(id.includes('node_modules')) if(id.includes('node_modules'))
{ {
if(id.includes('pixi.js')) return 'pixi.js';
if(id.includes('@nitrots/nitro-renderer')) return 'nitro-renderer'; if(id.includes('@nitrots/nitro-renderer')) return 'nitro-renderer';
return 'vendor'; return 'vendor';