- import svg as components
- no-drag images - package.json cleanup - terser minimizer
This commit is contained in:
2293
package-lock.json
generated
2293
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -60,8 +60,6 @@
|
|||||||
"mini-css-extract-plugin": "^2.10.0",
|
"mini-css-extract-plugin": "^2.10.0",
|
||||||
"postcss": "^8.5.8",
|
"postcss": "^8.5.8",
|
||||||
"postcss-loader": "^8.2.1",
|
"postcss-loader": "^8.2.1",
|
||||||
"postcss-normalize": "^13.0.1",
|
|
||||||
"postcss-preset-env": "^11.2.0",
|
|
||||||
"sass": "^1.97.3",
|
"sass": "^1.97.3",
|
||||||
"sass-loader": "^16.0.7",
|
"sass-loader": "^16.0.7",
|
||||||
"sass-migrator": "^2.5.7",
|
"sass-migrator": "^2.5.7",
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ body {
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// disable image dragging
|
||||||
|
img {
|
||||||
|
user-select: none;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||||
monospace;
|
monospace;
|
||||||
|
|||||||
@@ -2,11 +2,8 @@ import React, {useState} from "react";
|
|||||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||||
import {faBars} from "@fortawesome/free-solid-svg-icons/faBars";
|
import {faBars} from "@fortawesome/free-solid-svg-icons/faBars";
|
||||||
import {Menu} from "./Menu";
|
import {Menu} from "./Menu";
|
||||||
import wave from "../img/menu-wave.svg";
|
import {ReactComponent as Wave} from "../img/menu-wave.svg";
|
||||||
import "./nav.scss";
|
import "./nav.scss";
|
||||||
import {motion} from "framer-motion";
|
|
||||||
import {Link} from "../router/Link";
|
|
||||||
import {Path} from "../router/router";
|
|
||||||
import {Links} from "./Links";
|
import {Links} from "./Links";
|
||||||
|
|
||||||
export default function Nav() {
|
export default function Nav() {
|
||||||
@@ -18,7 +15,7 @@ export default function Nav() {
|
|||||||
<Links/>
|
<Links/>
|
||||||
</nav>
|
</nav>
|
||||||
<Menu active={active}/>
|
<Menu active={active}/>
|
||||||
<img className="wave" alt="wave" src={wave}/>
|
<Wave className="wave" />
|
||||||
</>;
|
</>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import HtmlWebpackPlugin from "html-webpack-plugin";
|
|||||||
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
||||||
import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
|
import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
|
||||||
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
|
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
|
||||||
|
import TerserPlugin from "terser-webpack-plugin";
|
||||||
import "webpack-dev-server";
|
import "webpack-dev-server";
|
||||||
|
|
||||||
const isProduction = process.env.NODE_ENV === "production";
|
const isProduction = process.env.NODE_ENV === "production";
|
||||||
@@ -11,6 +12,10 @@ const isProduction = process.env.NODE_ENV === "production";
|
|||||||
const config: webpack.Configuration = {
|
const config: webpack.Configuration = {
|
||||||
mode: isProduction ? "production" : "development",
|
mode: isProduction ? "production" : "development",
|
||||||
entry: "./src/index.tsx",
|
entry: "./src/index.tsx",
|
||||||
|
optimization: {
|
||||||
|
minimize: isProduction,
|
||||||
|
minimizer: [new TerserPlugin()]
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(import.meta.dirname, "build"),
|
path: path.resolve(import.meta.dirname, "build"),
|
||||||
filename: "static/js/[name].[contenthash:8].js",
|
filename: "static/js/[name].[contenthash:8].js",
|
||||||
|
|||||||
Reference in New Issue
Block a user