'admin-20.12.16:处理打包错误问题'

This commit is contained in:
lyt-Top 2020-12-16 00:38:52 +08:00
parent 941b298325
commit f1584625b6
16 changed files with 45 additions and 36 deletions

View File

@ -13,7 +13,7 @@
<div class="red">44</div>
</div>
<el-color-picker v-model="color" @change="colorChange"></el-color-picker>
<img src="/src/assets/images/logo/11.png" />
<img src="/src/assets/11.png" />
</template>
<script lang="ts">

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,23 @@
@import './element-variables.scss';
@import './transition.scss';
@font-face {
font-family: 'element-icons';
src: url('./element-icons.woff') format('woff'), /* chrome, firefox */
url('./element-icons.ttf') format('truetype'); /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
font-weight: normal;
// font-display: $--font-display;
font-style: normal;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
}

View File

@ -1,24 +0,0 @@
@import '../element/element-variables.scss';
@import '../transition/index.scss';
@font-face {
font-family: 'element-icons';
src: url('../fonts/element-icons.woff') format('woff'),
/* chrome, firefox */ url('../fonts/element-icons.ttf')
format('truetype'); /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
font-weight: normal;
font-display: $--font-display;
font-style: normal;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
}

View File

@ -2,7 +2,7 @@ import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus';
import '/@assets/style/base/index.scss';
import '/@/assets/index.scss';
const app = createApp(App)
app.use(ElementPlus)

View File

@ -1,18 +1,28 @@
import type { UserConfig } from 'vite'
const path = require('path')
import type { UserConfig } from 'vite';
import { resolve } from 'path';
const root: string = process.cwd();
function pathResolve(dir: string) {
return resolve(__dirname, '.', dir);
}
const alias: Record<string, string> = {
'/@/': pathResolve('src'),
};
const viteConfig: UserConfig = {
port: 8080,
hostname: 'localhost',
open: false,
base: "./",
alias: {
'/@/': path.resolve(__dirname, './src'),
'/@assets/': path.resolve(__dirname, './src/assets'),
'/@views/': path.resolve(__dirname, './src/views'),
'/@components/': path.resolve(__dirname, './src/components'),
'/@utils/': path.resolve(__dirname, './src/utils')
}
root,
alias,
// transforms: [
// globbyTransform({
// root: root,
// alias: alias
// })
// ],
}
export default viteConfig