From b72b32761058767d143e9ff08dc238c5ac9b777c Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sat, 7 Jan 2023 20:33:28 -0500 Subject: Fix reloading UI on updates and restarting steam (#303) --- frontend/rollup.config.js | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'frontend/rollup.config.js') diff --git a/frontend/rollup.config.js b/frontend/rollup.config.js index 00487d72..fc924c36 100644 --- a/frontend/rollup.config.js +++ b/frontend/rollup.config.js @@ -1,30 +1,27 @@ import commonjs from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; import { nodeResolve } from '@rollup/plugin-node-resolve'; -import externalGlobals from "rollup-plugin-external-globals"; -import del from 'rollup-plugin-delete' import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; import { defineConfig } from 'rollup'; +import del from 'rollup-plugin-delete'; +import externalGlobals from 'rollup-plugin-external-globals'; -const hiddenWarnings = [ - "THIS_IS_UNDEFINED", - "EVAL" -]; +const hiddenWarnings = ['THIS_IS_UNDEFINED', 'EVAL']; export default defineConfig({ input: 'src/index.tsx', plugins: [ - del({ targets: "../backend/static/*", force: true }), + del({ targets: '../backend/static/*', force: true }), commonjs(), nodeResolve(), externalGlobals({ react: 'SP_REACT', 'react-dom': 'SP_REACTDOM', // hack to shut up react-markdown - 'process': '{cwd: () => {}}', - 'path': '{dirname: () => {}, join: () => {}, basename: () => {}, extname: () => {}}', - 'url': '{fileURLToPath: (f) => f}' + process: '{cwd: () => {}}', + path: '{dirname: () => {}, join: () => {}, basename: () => {}, extname: () => {}}', + url: '{fileURLToPath: (f) => f}', }), typescript(), json(), @@ -38,11 +35,11 @@ export default defineConfig({ dir: '../backend/static', format: 'esm', chunkFileNames: (chunkInfo) => { - return 'chunk-[hash].js' - } + return 'chunk-[hash].js'; + }, }, - onwarn: function ( message, handleWarning ) { - if (hiddenWarnings.some(warning => message.code === warning)) return; + onwarn: function (message, handleWarning) { + if (hiddenWarnings.some((warning) => message.code === warning)) return; handleWarning(message); - } + }, }); -- cgit v1.2.3