mirror of
https://github.com/xfgryujk/blivechat.git
synced 2025-01-13 13:50:10 +08:00
前端暂时不使用CDN,因为BootCDN被uBlock Origin屏蔽了
This commit is contained in:
parent
e77c26c792
commit
e6299a03e8
@ -11,7 +11,7 @@
|
|||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
<title>blivechat</title>
|
<title>blivechat</title>
|
||||||
|
|
||||||
<% if (process.env.NODE_ENV === 'production') { %>
|
<!-- <% if (process.env.NODE_ENV === 'production') { %>
|
||||||
<script src="https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
|
<script src="https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
|
||||||
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.runtime.min.js"></script>
|
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.runtime.min.js"></script>
|
||||||
<script src="https://cdn.bootcdn.net/ajax/libs/vue-router/3.6.5/vue-router.min.js"></script>
|
<script src="https://cdn.bootcdn.net/ajax/libs/vue-router/3.6.5/vue-router.min.js"></script>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<link href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.13/theme-chalk/index.css" rel="stylesheet">
|
<link href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.13/theme-chalk/index.css" rel="stylesheet">
|
||||||
<script src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.13/index.js"></script>
|
<script src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.13/index.js"></script>
|
||||||
<script src="https://cdn.bootcdn.net/ajax/libs/pako/2.1.0/pako_inflate.js"></script>
|
<script src="https://cdn.bootcdn.net/ajax/libs/pako/2.1.0/pako_inflate.js"></script>
|
||||||
<% } %>
|
<% } %> -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
import VueI18n from 'vue-i18n'
|
import VueI18n from 'vue-i18n'
|
||||||
|
|
||||||
import zh from '@/lang/zh'
|
import zh from '@/lang/zh'
|
||||||
@ -5,6 +6,8 @@ import zh from '@/lang/zh'
|
|||||||
let lastSetLocale = 'zh'
|
let lastSetLocale = 'zh'
|
||||||
let loadedLocales = ['zh']
|
let loadedLocales = ['zh']
|
||||||
|
|
||||||
|
Vue.use(VueI18n)
|
||||||
|
|
||||||
export async function setLocale(locale) {
|
export async function setLocale(locale) {
|
||||||
lastSetLocale = locale
|
lastSetLocale = locale
|
||||||
if (loadedLocales.indexOf(locale) === -1) {
|
if (loadedLocales.indexOf(locale) === -1) {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueRouter from 'vue-router'
|
import VueRouter from 'vue-router'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import ElementUI from 'element-ui'
|
||||||
|
import 'element-ui/lib/theme-chalk/index.css'
|
||||||
|
|
||||||
import * as i18n from './i18n'
|
import * as i18n from './i18n'
|
||||||
import App from './App'
|
import App from './App'
|
||||||
@ -8,6 +10,9 @@ import NotFound from './views/NotFound'
|
|||||||
|
|
||||||
axios.defaults.timeout = 10 * 1000
|
axios.defaults.timeout = 10 * 1000
|
||||||
|
|
||||||
|
Vue.use(VueRouter)
|
||||||
|
Vue.use(ElementUI)
|
||||||
|
|
||||||
Vue.config.ignoredElements = [
|
Vue.config.ignoredElements = [
|
||||||
/^yt-/
|
/^yt-/
|
||||||
]
|
]
|
||||||
|
@ -27,13 +27,13 @@ module.exports = {
|
|||||||
return args
|
return args
|
||||||
})
|
})
|
||||||
|
|
||||||
config.externals({
|
// config.externals({
|
||||||
'element-ui': 'ELEMENT',
|
// 'element-ui': 'ELEMENT',
|
||||||
lodash: '_',
|
// lodash: '_',
|
||||||
pako: 'pako',
|
// pako: 'pako',
|
||||||
vue: 'Vue',
|
// vue: 'Vue',
|
||||||
'vue-router': 'VueRouter',
|
// 'vue-router': 'VueRouter',
|
||||||
'vue-i18n': 'VueI18n',
|
// 'vue-i18n': 'VueI18n',
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user