mirror of
https://github.com/xfgryujk/blivechat.git
synced 2024-12-25 20:30:28 +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">
|
||||
<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/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>
|
||||
@ -27,7 +27,7 @@
|
||||
<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/pako/2.1.0/pako_inflate.js"></script>
|
||||
<% } %>
|
||||
<% } %> -->
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
|
||||
import zh from '@/lang/zh'
|
||||
@ -5,6 +6,8 @@ import zh from '@/lang/zh'
|
||||
let lastSetLocale = 'zh'
|
||||
let loadedLocales = ['zh']
|
||||
|
||||
Vue.use(VueI18n)
|
||||
|
||||
export async function setLocale(locale) {
|
||||
lastSetLocale = locale
|
||||
if (loadedLocales.indexOf(locale) === -1) {
|
||||
|
@ -1,6 +1,8 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import axios from 'axios'
|
||||
import ElementUI from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
|
||||
import * as i18n from './i18n'
|
||||
import App from './App'
|
||||
@ -8,6 +10,9 @@ import NotFound from './views/NotFound'
|
||||
|
||||
axios.defaults.timeout = 10 * 1000
|
||||
|
||||
Vue.use(VueRouter)
|
||||
Vue.use(ElementUI)
|
||||
|
||||
Vue.config.ignoredElements = [
|
||||
/^yt-/
|
||||
]
|
||||
|
@ -27,13 +27,13 @@ module.exports = {
|
||||
return args
|
||||
})
|
||||
|
||||
config.externals({
|
||||
'element-ui': 'ELEMENT',
|
||||
lodash: '_',
|
||||
pako: 'pako',
|
||||
vue: 'Vue',
|
||||
'vue-router': 'VueRouter',
|
||||
'vue-i18n': 'VueI18n',
|
||||
})
|
||||
// config.externals({
|
||||
// 'element-ui': 'ELEMENT',
|
||||
// lodash: '_',
|
||||
// pako: 'pako',
|
||||
// vue: 'Vue',
|
||||
// 'vue-router': 'VueRouter',
|
||||
// 'vue-i18n': 'VueI18n',
|
||||
// })
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user