summaryrefslogtreecommitdiff
path: root/frontend/rollup.config.js
diff options
context:
space:
mode:
authorAAGaming <aa@mail.catvibers.me>2023-01-07 20:33:28 -0500
committerGitHub <noreply@github.com>2023-01-07 17:33:28 -0800
commitb72b32761058767d143e9ff08dc238c5ac9b777c (patch)
treeab3cb1d855a20c37355f1b0c650647cd733a1d5d /frontend/rollup.config.js
parentb8fdff80933b0164096c94358ab8123722906e0d (diff)
downloaddecky-loader-b72b32761058767d143e9ff08dc238c5ac9b777c.tar.gz
decky-loader-b72b32761058767d143e9ff08dc238c5ac9b777c.zip
Fix reloading UI on updates and restarting steam (#303)v2.4.9-pre1
Diffstat (limited to 'frontend/rollup.config.js')
-rw-r--r--frontend/rollup.config.js27
1 files changed, 12 insertions, 15 deletions
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);
- }
+ },
});