mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2026-01-15 12:15:02 +00:00
Build tweaks
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
const isProduction = process.env.NODE_ENV === "production";
|
||||
|
||||
const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
||||
enabled: isProduction,
|
||||
});
|
||||
const bundleAnalyzer = process.env.npm_config_argv?.includes(
|
||||
"build:bundle-analyzer"
|
||||
);
|
||||
|
||||
const webpack = require("webpack");
|
||||
|
||||
@@ -50,4 +50,8 @@ const nextConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = withBundleAnalyzer(nextConfig);
|
||||
module.exports = bundleAnalyzer
|
||||
? require("@next/bundle-analyzer")({
|
||||
enabled: isProduction,
|
||||
})(nextConfig)
|
||||
: nextConfig;
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
"defaults and supports es6 and not ie 11 and >1%"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "yarn build:fs && yarn build:search && next build",
|
||||
"build": "yarn build:prebuild && next build",
|
||||
"build:bundle-analyzer": "yarn build",
|
||||
"build:fs": "node scripts/fs2json.js --exclude .index --out public/.index/fs.9p.json ./public && node scripts/preloadIcons.js",
|
||||
"build:html": "node scripts/minifyHtml.js",
|
||||
"build:prebuild": "yarn build:fs && yarn build:search",
|
||||
"build:robots": "node scripts/robots.js",
|
||||
"build:search": "node scripts/searchIndex.js",
|
||||
"deploy": "yarn build:robots && next export && yarn build:html",
|
||||
@@ -21,7 +23,7 @@
|
||||
"export": "next export",
|
||||
"prepare": "husky install",
|
||||
"prettier": "prettier --write .",
|
||||
"start": "next start",
|
||||
"start": "next build && next start",
|
||||
"stylelint": "stylelint --formatter=verbose **/*.ts*",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
|
||||
Reference in New Issue
Block a user