From cb541c8bf0b91b8e170d76a35a8f7b1f801aa7dc Mon Sep 17 00:00:00 2001 From: AlecM33 Date: Tue, 28 Dec 2021 18:04:23 -0500 Subject: [PATCH] add not found script --- client/src/scripts/notFound.js | 9 +++++++++ client/webpack/webpack-dev.config.js | 3 ++- client/webpack/webpack-prod.config.js | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 client/src/scripts/notFound.js diff --git a/client/src/scripts/notFound.js b/client/src/scripts/notFound.js new file mode 100644 index 0000000..e5a5ee2 --- /dev/null +++ b/client/src/scripts/notFound.js @@ -0,0 +1,9 @@ +import { injectNavbar } from "../modules/Navbar.js"; + +const notFound = () => { injectNavbar(); }; + +if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { + module.exports = notFound; +} else { + notFound(); +} diff --git a/client/webpack/webpack-dev.config.js b/client/webpack/webpack-dev.config.js index c884208..07ad9c0 100644 --- a/client/webpack/webpack-dev.config.js +++ b/client/webpack/webpack-dev.config.js @@ -4,7 +4,8 @@ module.exports = { entry: { game: './client/src/scripts/game.js', home: './client/src/scripts/home.js', - create: './client/src/scripts/create.js' + create: './client/src/scripts/create.js', + notFound: './client/src/scripts/notFound.js' }, output: { path: path.resolve(__dirname, '../dist'), diff --git a/client/webpack/webpack-prod.config.js b/client/webpack/webpack-prod.config.js index 743bd7a..a39d2fd 100644 --- a/client/webpack/webpack-prod.config.js +++ b/client/webpack/webpack-prod.config.js @@ -5,7 +5,8 @@ module.exports = { entry: { game: './client/src/scripts/game.js', home: './client/src/scripts/home.js', - create: './client/src/scripts/create.js' + create: './client/src/scripts/create.js', + notFound: './client/src/scripts/notFound.js' }, output: { path: path.resolve(__dirname, '../dist'),