diff options
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/rollup.config.js | 11 | ||||
| -rw-r--r-- | frontend/src/plugin-loader.tsx | 6 |
2 files changed, 13 insertions, 4 deletions
diff --git a/frontend/rollup.config.js b/frontend/rollup.config.js index c4bcd0a2..eef52c22 100644 --- a/frontend/rollup.config.js +++ b/frontend/rollup.config.js @@ -5,7 +5,12 @@ 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 { defineConfig, handleWarning } from 'rollup'; + +const hiddenWarnings = [ + "THIS_IS_UNDEFINED", + "EVAL" +]; export default defineConfig({ input: 'src/index.tsx', @@ -35,5 +40,9 @@ export default defineConfig({ chunkFileNames: (chunkInfo) => { return 'chunk-[hash].js' } + }, + onwarn: function ( message ) { + if (hiddenWarnings.some(warning => message.code === warning)) return; + handleWarning(message); } }); diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index 73cfdf9a..381d7954 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -249,11 +249,11 @@ class PluginLoader extends Logger { <> Error:{' '} <pre> - <code>{e instanceof Error ? e.stack : e?.toString()}</code> + <code>{e instanceof Error ? e.stack : JSON.stringify(e)}</code> </pre> <> - Please go to <FaCog style={{ display: 'inline' }} /> in Decky Loader.e settings menu if you need to - uninstall this plugin. + Please go to <FaCog style={{ display: 'inline' }} /> in the Decky menu if you need to uninstall this + plugin. </> </> ); |
