mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-21 19:21:18 -04:00
swap browser-sync -> webpack-dev-server
This commit is contained in:
@@ -2,7 +2,6 @@ import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import webpack from "webpack";
|
||||
import WebpackAssetsManifest from "webpack-assets-manifest";
|
||||
import { SubresourceIntegrityPlugin } from "webpack-subresource-integrity";
|
||||
import CopyPlugin from "copy-webpack-plugin";
|
||||
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
||||
import CssMinimizerPlugin from "css-minimizer-webpack-plugin";
|
||||
@@ -59,16 +58,16 @@ export default {
|
||||
},
|
||||
],
|
||||
}),
|
||||
new SubresourceIntegrityPlugin({
|
||||
enabled: true,
|
||||
hashFuncNames: ["sha384"],
|
||||
}),
|
||||
new WebpackAssetsManifest({
|
||||
writeToDisk: true, // allow Hugo to access file in dev mode
|
||||
output: path.resolve(__dirname, "data/manifest.json"),
|
||||
publicPath: true,
|
||||
integrity: true,
|
||||
integrityHashes: ["sha384"],
|
||||
customize: (entry) => {
|
||||
// don't add thousands of unneeded twemoji graphics to the manifest
|
||||
if (entry.key.startsWith("emoji/")) return false;
|
||||
},
|
||||
}),
|
||||
],
|
||||
module: {
|
||||
@@ -219,4 +218,14 @@ export default {
|
||||
}),
|
||||
],
|
||||
},
|
||||
devServer: {
|
||||
static: {
|
||||
directory: path.join(__dirname, "public"),
|
||||
watch: true,
|
||||
},
|
||||
host: "0.0.0.0", // weird docker bind behavior
|
||||
port: process.env.PORT || 1337,
|
||||
compress: true,
|
||||
liveReload: true,
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user