-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(projects): merge branch unocss to main
- Loading branch information
Showing
72 changed files
with
3,937 additions
and
2,133 deletions.
There are no files selected for viewing
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 +1,6 @@ | ||
VITE_VISUALIZER=true | ||
|
||
VITE_COMPRESS=true | ||
|
||
# gzip | brotliCompress | deflate | deflateRaw | ||
VITE_COMPRESS_TYPE=gzip |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
shamefully-hoist=true |
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,3 +1,2 @@ | ||
export * from './path'; | ||
export * from './define'; | ||
export * from './proxy'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import ViteCompression from 'vite-plugin-compression'; | ||
|
||
export default (viteEnv: ImportMetaEnv) => { | ||
const { VITE_COMPRESS_TYPE = 'gzip' } = viteEnv; | ||
return ViteCompression({ algorithm: VITE_COMPRESS_TYPE }); | ||
}; |
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,27 +1,26 @@ | ||
import type { ConfigEnv, PluginOption } from 'vite'; | ||
import type { PluginOption } from 'vite'; | ||
import vue from './vue'; | ||
import html from './html'; | ||
import autoImport from './auto-import'; | ||
import windicss from './windicss'; | ||
import unplugin from './unplugin'; | ||
import unocss from './unocss'; | ||
import mock from './mock'; | ||
import visualizer from './visualizer'; | ||
import compress from './compress'; | ||
|
||
/** | ||
* vite插件 | ||
* @param configEnv - 环境 | ||
* @param srcPath - src路径 | ||
* vite插件 | ||
* @param viteEnv - 环境变量配置 | ||
* @param srcPath - src路径 | ||
*/ | ||
export function setupVitePlugins( | ||
configEnv: ConfigEnv, | ||
srcPath: string, | ||
viteEnv: ImportMetaEnv | ||
): (PluginOption | PluginOption[])[] { | ||
const plugins = [vue, html(configEnv), ...autoImport(srcPath), windicss, mock]; | ||
export function setupVitePlugins(viteEnv: ImportMetaEnv, srcPath: string): (PluginOption | PluginOption[])[] { | ||
const plugins = [...vue, html(viteEnv), ...unplugin(srcPath), unocss, mock]; | ||
|
||
if (configEnv.command === 'build' && viteEnv.VITE_VISUALIZER === 'true') { | ||
if (viteEnv.VITE_VISUALIZER === 'true') { | ||
plugins.push(visualizer); | ||
} | ||
if (viteEnv.VITE_COMPRESS === 'true') { | ||
plugins.push(compress(viteEnv)); | ||
} | ||
|
||
return plugins; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import unocss from 'unocss/vite'; | ||
|
||
export default unocss(); |
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,3 +1,6 @@ | ||
import vue from '@vitejs/plugin-vue'; | ||
import vueJsx from '@vitejs/plugin-vue-jsx'; | ||
|
||
export default vue({}); | ||
const plugins = [vue(), vueJsx()]; | ||
|
||
export default plugins; |
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
Oops, something went wrong.
69d5131
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
soybean-admin – ./
www.soybean.pro
soybean-admin.vercel.app
soybean-admin-honghuangdc.vercel.app
soybean.pro
soybean-admin-git-main-honghuangdc.vercel.app