{!isNil(sourcedMetadata.comicvine) && (
-
+
)}
{/* Raw file presence */}
diff --git a/src/server/index.ts b/src/server/index.ts
index 77f141d..4204ed7 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -1,6 +1,7 @@
import express, { Request, Response, Router, Express } from "express";
import bodyParser from "body-parser";
import router from "./route";
+import path from "path";
// call express
const app: Express = express(); // define our app using express
@@ -14,7 +15,7 @@ const port: number = Number(process.env.PORT) || 8050; // set our port
app.get("/", (req: Request, res: Response) => {
console.log("sending index.html");
- res.sendFile("/dist/index.html");
+ res.sendFile(path.resolve(__dirname, "../dist/index.html"));
});
// REGISTER ROUTES
diff --git a/webpack.config.js b/webpack.config.js
index 672974f..5d82061 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -5,6 +5,7 @@ const webpack = require("webpack");
const outputDirectory = "dist";
const BundleAnalyzerPlugin =
require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
+const CopyPlugin = require("copy-webpack-plugin");
module.exports = (env) => {
return {
@@ -72,7 +73,6 @@ module.exports = (env) => {
port: 3050,
open: true,
hot: true,
- contentBase: "./dist",
proxy: {
"/api/**": {
target: "http://localhost:8050",
@@ -86,6 +86,12 @@ module.exports = (env) => {
},
plugins: [
// new BundleAnalyzerPlugin(),
+ new CopyPlugin({
+ patterns: [{ from: "./src/client/assets/img/", to: "img/" }],
+ options: {
+ concurrency: 100,
+ },
+ }),
new HtmlWebpackPlugin({
template: "./public/index.html",
favicon: "./public/favicon.ico",
diff --git a/yarn.lock b/yarn.lock
index f5d8e67..ee8ed1b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4102,6 +4102,19 @@ copy-descriptor@^0.1.0:
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
+copy-webpack-plugin@^9.0.1:
+ version "9.0.1"
+ resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-9.0.1.tgz#b71d21991599f61a4ee00ba79087b8ba279bbb59"
+ integrity sha512-14gHKKdYIxF84jCEgPgYXCPpldbwpxxLbCmA7LReY7gvbaT555DgeBWBgBZM116tv/fO6RRJrsivBqRyRlukhw==
+ dependencies:
+ fast-glob "^3.2.5"
+ glob-parent "^6.0.0"
+ globby "^11.0.3"
+ normalize-path "^3.0.0"
+ p-limit "^3.1.0"
+ schema-utils "^3.0.0"
+ serialize-javascript "^6.0.0"
+
core-js-compat@^3.16.0, core-js-compat@^3.16.2:
version "3.18.0"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.18.0.tgz#fb360652201e8ac8da812718c008cd0482ed9b42"
@@ -5616,7 +5629,7 @@ fast-diff@^1.1.2:
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
-fast-glob@^3, fast-glob@^3.0.3, fast-glob@^3.1.1:
+fast-glob@^3, fast-glob@^3.0.3, fast-glob@^3.1.1, fast-glob@^3.2.5:
version "3.2.7"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1"
integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==
@@ -6199,6 +6212,13 @@ glob-parent@^5.1.2, glob-parent@~5.1.2:
dependencies:
is-glob "^4.0.1"
+glob-parent@^6.0.0:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
+ integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
+ dependencies:
+ is-glob "^4.0.3"
+
glob-to-regexp@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
@@ -7270,6 +7290,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1:
dependencies:
is-extglob "^2.1.1"
+is-glob@^4.0.3:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
+ integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
+ dependencies:
+ is-extglob "^2.1.1"
+
is-in-browser@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-in-browser/-/is-in-browser-2.0.0.tgz#a2343a18d8f8a600e8a20cb3022183a251e30355"