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>
<div id="root" class="w-100 h-100"></div>
<script>
const NitroConfig = {
window.NitroConfig = {
"config.urls": [ '/renderer-config.json', '/ui-config.json' ],
"socket.url": (new URLSearchParams(window.location.search).get('socket.url') || null),
"sso.ticket": (new URLSearchParams(window.location.search).get('sso') || null),

View File

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

View File

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