'admin-20.12.16:处理打包路由错误问题'
This commit is contained in:
parent
f1584625b6
commit
c5557c038c
4
vue-admin-wonderful-next/source.d.ts
vendored
Normal file
4
vue-admin-wonderful-next/source.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare const React: string;
|
||||
declare module '*.json';
|
||||
declare module '*.png';
|
||||
declare module '*.jpg';
|
@ -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/11.png" />
|
||||
<img src="/@/assets/11.png" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -1,23 +0,0 @@
|
||||
@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%;
|
||||
}
|
@ -2,8 +2,8 @@ import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
import ElementPlus from 'element-plus';
|
||||
import '/@/assets/index.scss';
|
||||
// import 'element-plus/lib/theme-chalk/index.css';
|
||||
import '/@/style/index.scss';
|
||||
|
||||
createApp(App).use(ElementPlus).mount('#app')
|
||||
|
||||
const app = createApp(App)
|
||||
app.use(ElementPlus)
|
||||
app.mount('#app')
|
||||
|
23
vue-admin-wonderful-next/src/style/index.scss
Normal file
23
vue-admin-wonderful-next/src/style/index.scss
Normal 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%;
|
||||
}
|
@ -1,28 +1,13 @@
|
||||
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'),
|
||||
};
|
||||
import path from 'path';
|
||||
|
||||
const viteConfig: UserConfig = {
|
||||
port: 8080,
|
||||
hostname: 'localhost',
|
||||
open: false,
|
||||
root,
|
||||
alias,
|
||||
// transforms: [
|
||||
// globbyTransform({
|
||||
// root: root,
|
||||
// alias: alias
|
||||
// })
|
||||
// ],
|
||||
alias: {
|
||||
'/@/': path.resolve(__dirname, './src')
|
||||
},
|
||||
}
|
||||
|
||||
export default viteConfig
|
||||
|
Loading…
Reference in New Issue
Block a user