Skip to content

Commit

Permalink
Merge pull request #3 from MR-Mostafa/dev
Browse files Browse the repository at this point in the history
Dev to main
  • Loading branch information
MR-Mostafa committed Aug 15, 2022
2 parents f469a48 + 172986e commit 24087f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
"reset:git": "rimraf .git && git init && git add . && git commit -m \"init commit\"",
"reset:vite": "rimraf ./.vite-cache ./dist",
"reset:file": "node ./clean.js",
"reset": "yarn run reset:vite && yarn run reset:file && yarn run reset:git",
"dev": "yarn run reset:vite && cross-env DEBUG=vite:plugin:mkcert HTTPS=true vite",
"dev:http": "yarn run reset:vite && vite",
"build": "yarn run reset:vite && tsc && vite build",
"preview": "yarn run build && vite preview",
"analyze": "yarn run reset:vite && cross-env ANALYZE=true yarn run build",
"reset": "npm run reset:vite && npm run reset:file && npm run reset:git",
"dev": "npm run reset:vite && cross-env DEBUG=vite:plugin:mkcert HTTPS=true vite",
"dev:http": "npm run reset:vite && vite",
"build": "npm run reset:vite && tsc && vite build",
"preview": "npm run build && vite preview",
"analyze": "npm run reset:vite && cross-env ANALYZE=true npm run build",
"mock:server": "json-server --watch ./mock/index.json --config ./mock/config.json",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
Expand Down
5 changes: 2 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const shouldAnalyze = process.env.ANALYZE ?? false;
const isHttps = process.env.HTTPS ?? false;

// https://vitejs.dev/config/
export default defineConfig((mode) => {
export default defineConfig((config: ConfigEnv) => {
return {
plugins: [
react({
Expand All @@ -40,13 +40,12 @@ export default defineConfig((mode) => {
Unocss(),

viteImagemin({
disable: mode === 'development',
disable: config.mode === 'development',
mozjpeg: {
progressive: true,
quality: 80,
},
optipng: {
enabled: true,
optimizationLevel: 3,
},
pngquant: {
Expand Down

0 comments on commit 24087f3

Please sign in to comment.