-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 移除前端gifsicle和vite-plugin-imagemin
- Loading branch information
1 parent
9777fed
commit 40ef076
Showing
27 changed files
with
144 additions
and
41,401 deletions.
There are no files selected for viewing
20 changes: 0 additions & 20 deletions
20
templates/abp-vnext-pro-nuget-all/Delete-BIN-OBJ-Folders.bat
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
FROM nginx:1.17.3-alpine as base | ||
EXPOSE 80 | ||
FROM node:16-alpine as build-stage | ||
WORKDIR /app | ||
COPY . ./ | ||
ENV NODE_OPTIONS=--max-old-space-size=16384 | ||
|
||
RUN npm install pnpm -g | ||
RUN pnpm i | ||
RUN npm run build | ||
|
||
COPY /_nginx/nginx.conf /etc/nginx/nginx.conf | ||
COPY /_nginx/env.js /etc/nginx/env.js | ||
COPY /_nginx/default.conf /etc/nginx/conf.d/default.conf | ||
COPY /dist/ /usr/share/nginx/html | ||
|
||
FROM nginx:1.17.3-alpine as production-stage | ||
COPY --from=build-stage app/_nginx/nginx.conf /etc/nginx/nginx.conf | ||
COPY --from=build-stage app/_nginx/env.js /etc/nginx/env.js | ||
COPY --from=build-stage app/_nginx/default.conf /etc/nginx/conf.d/default.conf | ||
COPY --from=build-stage app/dist/ /usr/share/nginx/html | ||
EXPOSE 80 | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
66 changes: 33 additions & 33 deletions
66
templates/abp-vnext-pro-nuget-all/vben28/build/vite/plugin/imagemin.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
// Image resource files used to compress the output of the production environment | ||
// https://github.com/anncwb/vite-plugin-imagemin | ||
import viteImagemin from 'vite-plugin-imagemin'; | ||
// // Image resource files used to compress the output of the production environment | ||
// // https://github.com/anncwb/vite-plugin-imagemin | ||
// import viteImagemin from 'vite-plugin-imagemin'; | ||
|
||
export function configImageminPlugin() { | ||
const plugin = viteImagemin({ | ||
gifsicle: { | ||
optimizationLevel: 7, | ||
interlaced: false, | ||
}, | ||
optipng: { | ||
optimizationLevel: 7, | ||
}, | ||
mozjpeg: { | ||
quality: 20, | ||
}, | ||
pngquant: { | ||
quality: [0.8, 0.9], | ||
speed: 4, | ||
}, | ||
svgo: { | ||
plugins: [ | ||
{ | ||
name: 'removeViewBox', | ||
}, | ||
{ | ||
name: 'removeEmptyAttrs', | ||
active: false, | ||
}, | ||
], | ||
}, | ||
}); | ||
return plugin; | ||
} | ||
// export function configImageminPlugin() { | ||
// const plugin = viteImagemin({ | ||
// gifsicle: { | ||
// optimizationLevel: 7, | ||
// interlaced: false, | ||
// }, | ||
// optipng: { | ||
// optimizationLevel: 7, | ||
// }, | ||
// mozjpeg: { | ||
// quality: 20, | ||
// }, | ||
// pngquant: { | ||
// quality: [0.8, 0.9], | ||
// speed: 4, | ||
// }, | ||
// svgo: { | ||
// plugins: [ | ||
// { | ||
// name: 'removeViewBox', | ||
// }, | ||
// { | ||
// name: 'removeEmptyAttrs', | ||
// active: false, | ||
// }, | ||
// ], | ||
// }, | ||
// }); | ||
// return plugin; | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.