thibaud frere commited on
Commit ·
92efa50
1
Parent(s): 9c2c882
update
Browse filesFiles changed (3)
12345678<!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">123456<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta charset="utf8"><base target="_blank">
12345644 unmodified lines515253545556575822 unmodified lines818283848586878889909192const path = require("path");const { CleanWebpackPlugin } = require("clean-webpack-plugin");const CopyPlugin = require("copy-webpack-plugin");const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;const COLOR_KEYS = ["color", "bgColor", "fillcolor"];44 unmodified linesmain: "./src/index.js",},output: {filename: "[name].bundle.js",path: path.resolve(__dirname, "dist"),},module: {rules: [22 unmodified linesto: "assets",},{ from: "src/style.css", to: "style.css" },{ from: "src/bibliography.bib", to: "bibliography.bib" },{ from: "src/index.html", to: "index.html" }],}),],devtool: process.env.NODE_ENV === 'production' ? 'source-map' : 'eval-source-map',devServer: {static: "./dist",open: process.env.NODE_ENV !== 'production',123456744 unmodified lines52535455565758596022 unmodified lines8384858687888990919293949596979899100101102103104105106107108109110const 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 linesmain: "./src/index.js",},output: {filename: "[name].[contenthash:8].bundle.js",path: path.resolve(__dirname, "dist"),clean: true,},module: {rules: [22 unmodified linesto: "assets",},{ from: "src/style.css", to: "style.css" },{ 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 lines11121314151617181920215 unmodified lines272829303110 unmodified linesinclude /etc/nginx/mime.types;default_type application/octet-stream;access_log /tmp/access.log;error_log /tmp/error.log;sendfile on;keepalive_timeout 65;server {listen 8080;5 unmodified lineslocation / {try_files $uri $uri/ /index.html;}}}10 unmodified lines111213141516171819202122232425265 unmodified lines323334353637383940414243444510 unmodified linesinclude /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 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 lineslocation / {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