Skip to content

Commit

Permalink
测试
Browse files Browse the repository at this point in the history
  • Loading branch information
jsxiaosi committed Jun 18, 2021
1 parent 1dfc67f commit 6915d16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
17 changes: 7 additions & 10 deletions build/vite/plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,24 @@ import vue from '@vitejs/plugin-vue'
// 按需加载样式配置
import { configStylePlugin } from './style'
// 主题切换配置
import { configThemePlugin } from './theme';
import { configThemePlugin } from './theme'
// svg配置
import { configSvgPlugin } from './svg';
import { configSvgPlugin } from './svg'
// 压缩
import { configCompressPlugin } from './compress'

import viteESLint from '@ehutch79/vite-eslint'
// import viteESLint from '@ehutch79/vite-eslint'


export function createVitePlugins() {
const vitePlugins = [
vue()
]
export function createVitePlugins () {
const vitePlugins = [vue()]
vitePlugins.push(configStylePlugin())

vitePlugins.push(configThemePlugin())

vitePlugins.push(configSvgPlugin())

vitePlugins.push(configCompressPlugin('gzip',true))
vitePlugins.push(configCompressPlugin('gzip', true))

vitePlugins.push(viteESLint())
// vitePlugins.push(viteESLint())
return vitePlugins
}
6 changes: 2 additions & 4 deletions src/views/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
<script setup>
// 直接导入组件
import HelloWorld from '@/components/HelloWorld.vue'
import { useContext } from "vue"
import { useContext } from 'vue'
console.log(useContext())
</script>

<style>
</style>
<style></style>

0 comments on commit 6915d16

Please sign in to comment.