Skip to content

Commit

Permalink
disable minification on dev command
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamlinerm committed Jan 9, 2025
1 parent f47629c commit b038fe4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@
},
"scripts": {
"build": "npm run build:chrome && npm run build:firefox",
"build:chrome": "cross-env NODE_ENV=production vite build -c vite.chrome.config.ts",
"build:firefox": "cross-env NODE_ENV=production vite build -c vite.firefox.config.ts",
"build:chrome": "cross-env MINIFY=true NODE_ENV=production vite build -c vite.chrome.config.ts",
"build:firefox": "cross-env MINIFY=true NODE_ENV=production vite build -c vite.firefox.config.ts",
"dev": "concurrently \"npm run dev:chrome\" \"npm run dev:firefox\"",
"dev:chrome": "cross-env NODE_ENV=development vite -c vite.chrome.config.ts",
"dev:firefox": "cross-env NODE_ENV=development vite build --mode development --watch -c vite.firefox.config.ts",
"dev:chrome": "cross-env MINIFY=false NODE_ENV=development vite -c vite.chrome.config.ts",
"dev:firefox": "cross-env MINIFY=false NODE_ENV=development vite build --mode development --watch -c vite.firefox.config.ts",
"format": "prettier --write .",
"launch": "tsx scripts/launch.ts",
"launch:all": "tsx scripts/launch.ts --all",
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { dirname, relative, resolve } from "node:path"
import "dotenv/config"

const PORT = Number(process.env.PORT || "") || 3303
const shouldMinify = process.env.MINIFY === "true"
console.log("MINIFY", shouldMinify)

function getImmediateDirectories(dirPath: string): string[] {
try {
Expand Down Expand Up @@ -173,6 +175,7 @@ export default defineConfig({
devtoolsPanel: "src/ui/devtools-panel/index.html",
},
},
minify: shouldMinify,
},

server: {
Expand Down

0 comments on commit b038fe4

Please # to comment.