Skip to content

Commit

Permalink
Make builds smaller by running clean and optimizing the builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsnyder committed Sep 25, 2024
1 parent 429cd2d commit 35f07ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dev": "npm-run-all -p watch sandbox",
"format": "prettier --write \"*.{js,jsx,html,mjs,cjs}\" \"{src,test,scripts}/**/*.{js,jsx,html,mjs,cjs}\"",
"lint": "eslint \"*.{js,jsx}\" \"{src,test,scripts}/**/*.{js,jsx}\" --cache --fix",
"package": "npm run build && npx @adobe/reactor-packager",
"package": "npm run clean && NODE_ENV=production npm run build && npx @adobe/reactor-packager@latest",
"precommit-msg": "echo 'Running pre-commit scripts...' && exit 0",
"prepare": "husky install",
"prepush-msg": "echo 'Running pre-push scripts...' && exit 0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/buildViews.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { watch, inputDir, outputDir } from "./helpers/options.mjs";
const viewEntries = path.join(inputDir, "view/**/*.html");
const viewOutDir = path.join(outputDir, "view");

const isProd = process.env.NODE_ENV === "production";
const isProd = (process.env.NODE_ENV === "production");

const bundler = new Parcel({
entries: viewEntries,
Expand All @@ -33,7 +33,7 @@ const bundler = new Parcel({
publicUrl: "../",
distDir: viewOutDir,
sourceMaps: !isProd,
// shouldOptimize: false,
shouldOptimize: isProd,
shouldScopeHoist: false,
},
shouldDisableCache: true,
Expand Down

0 comments on commit 35f07ac

Please sign in to comment.