Skip to content

Commit

Permalink
feat: 加入https校验,方便移动端调试接口
Browse files Browse the repository at this point in the history
  • Loading branch information
fonghehe committed Jun 24, 2023
1 parent 9c8c57a commit 7f985ee
Show file tree
Hide file tree
Showing 4 changed files with 8,222 additions and 8,229 deletions.
3 changes: 3 additions & 0 deletions build/vite/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { ConfigProgressPlugin } from './progress';
import { ConfigEruda } from './eruda';
import { ConfigImageminPlugin } from './imagemin';
import { ConfigVisualizerConfig } from './visualizer';
import basicSsl from '@vitejs/plugin-basic-ssl';

export function createVitePlugins(env: ViteEnv, isBuild: boolean) {
const { VITE_USE_MOCK, VITE_USE_ERUDA, VITE_USE_COMPRESS, VITE_USE_REPORT } = env;
Expand Down Expand Up @@ -58,6 +59,8 @@ export function createVitePlugins(env: ViteEnv, isBuild: boolean) {
// vite-plugin-svg-icons
vitePlugins.push(ConfigSvgIconsPlugin(isBuild));

vitePlugins.push(basicSsl());

if (isBuild) {
// vite-plugin-imagemin
vitePlugins.push(ConfigImageminPlugin());
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@nutui/icons-vue": "^0.1.1",
"@nutui/nutui": "^4.1.0",
"@varlet/ui": "^2.12.2",
"@varlet/ui": "^2.13.0",
"@vueuse/core": "10.2.1",
"@vueuse/integrations": "10.2.1",
"axios": "1.4.0",
Expand All @@ -29,11 +29,12 @@
"vant": "^4.6.2",
"vue": "^3.3.1",
"vue-i18n": "^9.2.2",
"vue-router": "^4.2.3"
"vue-router": "^4.2.4"
},
"devDependencies": {
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
"@vitejs/plugin-basic-ssl": "^1.0.1",
"@vitejs/plugin-legacy": "^4.1.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1",
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default function ({ command, mode }: ConfigEnv): UserConfig {
server: {
host: true,
hmr: true,
https: true,
},
plugins: createVitePlugins(viteEnv, isProduction),
build: {
Expand Down
Loading

0 comments on commit 7f985ee

Please sign in to comment.