From bf04153877b3d5cca9514f3a1e5eed9224283331 Mon Sep 17 00:00:00 2001 From: Michael <44533763+iTNTPiston@users.noreply.github.com> Date: Mon, 3 Oct 2022 22:44:55 -0700 Subject: [PATCH 1/2] Direct Load URL (#17) * direct load url * lint fix --- config/webpack.config.js | 11 ++- package-lock.json | 108 ++++++++++++++++++++++-- package.json | 5 +- public/index.html | 2 +- src/App.css | 8 ++ src/components/LoadingScreen.tsx | 8 +- src/core/Slots/Slots.add.test.ts | 2 +- src/core/Slots/Slots.remove.test.ts | 2 +- src/core/Slots/Slots.updateLife.test.ts | 2 +- src/data/serialize.test.ts | 33 ++++++++ src/data/serialize.ts | 40 +++++++++ src/index.tsx | 11 +-- src/surfaces/DirectLoadPage.tsx | 51 +++++++++++ src/surfaces/OptionPage.tsx | 85 ++++++++++++++----- 14 files changed, 326 insertions(+), 42 deletions(-) create mode 100644 src/data/serialize.test.ts create mode 100644 src/data/serialize.ts create mode 100644 src/surfaces/DirectLoadPage.tsx diff --git a/config/webpack.config.js b/config/webpack.config.js index eb9395a..d46b080 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -297,9 +297,9 @@ module.exports = function (webpackEnv) { ], }, resolve: { - // fallback: { - // buffer: require.resolve("buffer/") - // }, + fallback: { + buffer: require.resolve("buffer/") + }, // This allows you to set a fallback for where webpack should look for modules. // We placed these paths second because we want `node_modules` to "win" // if there are any conflicts. This matches Node resolution mechanism. @@ -579,6 +579,11 @@ module.exports = function (webpackEnv) { ].filter(Boolean), }, plugins: [ + // Work around for Buffer is undefined: + // https://github.com/webpack/changelog-v5/issues/10 + new webpack.ProvidePlugin({ + Buffer: ['buffer', 'Buffer'], + }), // Generates an `index.html` file with the