-
-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
122 additions
and
39 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
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,34 +1,28 @@ | ||
import type { PluginOption } from 'vite' | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react' | ||
import reactRefresh from '@vitejs/plugin-react-refresh' | ||
import UnoCss from 'unocss/vite' | ||
import React from '@vitejs/plugin-react' | ||
import UnoCSS from 'unocss/vite' | ||
import presetAttributify from '@unocss/preset-attributify' | ||
import presetIcons from '@unocss/preset-icons' | ||
import presetUno from '@unocss/preset-uno' | ||
import presetAttributify from '@unocss/preset-attributify' | ||
|
||
const plugins: (PluginOption | PluginOption[])[] = [ | ||
UnoCss({ | ||
shortcuts: [ | ||
{ logo: 'i-logos-react w-6em h-6em transform transition-800 hover:rotate-180' }, | ||
], | ||
presets: [ | ||
presetUno(), | ||
presetAttributify(), | ||
presetIcons({ | ||
extraProperties: { | ||
'display': 'inline-block', | ||
'vertical-align': 'middle', | ||
}, | ||
}), | ||
], | ||
}), | ||
] | ||
|
||
if (process.env.USE_REFRESH === 'true') | ||
plugins.unshift(reactRefresh()) | ||
else | ||
plugins.push(react()) | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ plugins }) | ||
export default defineConfig({ | ||
plugins: [ | ||
React(), | ||
UnoCSS({ | ||
shortcuts: [ | ||
{ logo: 'i-logos-react w-6em h-6em transform transition-800 hover:rotate-180' }, | ||
], | ||
presets: [ | ||
presetUno(), | ||
presetAttributify(), | ||
presetIcons({ | ||
extraProperties: { | ||
'display': 'inline-block', | ||
'vertical-align': 'middle', | ||
}, | ||
}), | ||
], | ||
}), | ||
], | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
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,22 @@ | ||
{ | ||
"name": "vite-vue3", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"vue": "^3.2.37" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^3.0.0", | ||
"typescript": "^4.6.4", | ||
"@unocss/core": "link:../../packages/core", | ||
"@unocss/preset-attributify": "link:../../packages/preset-attributify", | ||
"@unocss/preset-icons": "link:../../packages/preset-icons", | ||
"unocss": "link:../../packages/unocss", | ||
"vite": "^3.0.0" | ||
} | ||
} |
Empty file.
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,8 @@ | ||
<template> | ||
<div text-center font-sans p4> | ||
<div logo /> | ||
<div text-green5> | ||
Hello UnoCSS + Vue | ||
</div> | ||
</div> | ||
</template> |
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,5 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import 'uno.css' | ||
|
||
createApp(App).mount('#app') |
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,16 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"useDefineForClassFields": true, | ||
"module": "ESNext", | ||
"moduleResolution": "Node", | ||
"strict": true, | ||
"jsx": "preserve", | ||
"sourceMap": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"lib": ["ESNext", "DOM"], | ||
"skipLibCheck": 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { defineConfig } from 'vite' | ||
import Vue from '@vitejs/plugin-vue' | ||
import UnoCSS from 'unocss/vite' | ||
import presetAttributify from '@unocss/preset-attributify' | ||
import presetIcons from '@unocss/preset-icons' | ||
import presetUno from '@unocss/preset-uno' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
Vue(), | ||
UnoCSS({ | ||
shortcuts: [ | ||
{ logo: 'i-logos-vue w-6em h-6em transform transition-800' }, | ||
], | ||
presets: [ | ||
presetUno(), | ||
presetAttributify(), | ||
presetIcons({ | ||
extraProperties: { | ||
'display': 'inline-block', | ||
'vertical-align': 'middle', | ||
}, | ||
}), | ||
], | ||
}), | ||
], | ||
}) |
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