thibaud frere commited on
Commit ·
92efa50
1
Parent(s): 9c2c882
update
Browse filesFiles changed (3)
12345456<!DOCTYPE html><html><head> <script src="distill.bundle.js" type="module" fetchpriority="high" blocking></script> <script src="main.bundle.js" type="module" fetchpriority="low" defer></script> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta charset="utf8"> <base target="_blank">123456744 unmodified lines5253545455565758596022 unmodified lines83848584858687888990919293949596979899100101102103104105106107108109110const path = require("path");const { CleanWebpackPlugin } = require("clean-webpack-plugin");const CopyPlugin = require("copy-webpack-plugin");const HtmlWebpackPlugin = require("html-webpack-plugin");const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
const COLOR_KEYS = ["color", "bgColor", "fillcolor"];44 unmodified lines main: "./src/index.js", }, output: { filename: "[name].bundle.js", filename: "[name].[contenthash:8].bundle.js", path: path.resolve(__dirname, "dist"), clean: true, }, module: { rules: [22 unmodified lines to: "assets", }, { from: "src/style.css", to: "style.css" }, { from: "src/bibliography.bib", to: "bibliography.bib" }, { from: "src/index.html", to: "index.html" } { from: "src/bibliography.bib", to: "bibliography.bib" } ], }), new HtmlWebpackPlugin({ template: path.resolve(__dirname, "src/index.html"), inject: "body", minify: process.env.NODE_ENV === 'production' ? { collapseWhitespace: true, removeComments: true, removeRedundantAttributes: true, removeScriptTypeAttributes: true, useShortDoctype: true, } : false, }), ], devtool: process.env.NODE_ENV === 'production' ? 'source-map' : 'eval-source-map', optimization: { splitChunks: { chunks: 'all', }, runtimeChunk: 'single', }, devServer: { static: "./dist", open: process.env.NODE_ENV !== 'production',10 unmodified lines11121314151416171819202122232425265 unmodified lines323334353637383940414243444510 unmodified lines include /etc/nginx/mime.types; default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" $status ' '$body_bytes_sent "$http_referer" "$http_user_agent" "$http_sec_purpose" $request_time'; access_log /tmp/access.log; access_log /tmp/access.log main; error_log /tmp/error.log;
sendfile on; keepalive_timeout 65; gzip on; gzip_types text/plain text/css application/javascript application/json image/svg+xml; gzip_min_length 1024;
server { listen 8080;5 unmodified lines location / { try_files $uri $uri/ /index.html; }
location = /health { return 200 'ok'; add_header Content-Type text/plain; }
location ~* \.(js|css)$ { add_header Cache-Control "public, max-age=31536000, immutable"; } }}app/src/index.html-2
app/webpack.config.js+21-3
nginx.conf+15-1