Commit 7fabde36 authored by ww-xxy's avatar ww-xxy

关闭cdn外部资源

parent ef6a16b7
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<script src="https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js"></script> <!-- <script src="https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js"></script>
<script src="https://unpkg.zhimg.com/vuex@3.6.0/dist/vuex.min.js"></script> <script src="https://unpkg.zhimg.com/vuex@3.6.0/dist/vuex.min.js"></script>
<script src="https://unpkg.zhimg.com/vue-router@3.4.9/dist/vue-router.min.js"></script> <script src="https://unpkg.zhimg.com/vue-router@3.4.9/dist/vue-router.min.js"></script>
<script src="https://unpkg.zhimg.com/element-ui@2.15.5/lib/index.js"></script> <script src="https://unpkg.zhimg.com/element-ui@2.15.5/lib/index.js"></script>
<script src="https://unpkg.zhimg.com/vue-amap/dist/index.js"></script> <script src="https://unpkg.zhimg.com/vue-amap/dist/index.js"></script> -->
</body> </body>
</html> </html>
...@@ -9,8 +9,8 @@ NProgress.configure({ showSpinner: false }) ...@@ -9,8 +9,8 @@ NProgress.configure({ showSpinner: false })
Vue.use(Router); Vue.use(Router);
const originalPush = VueRouter.prototype.push const originalPush = Router.prototype.push
VueRouter.prototype.push = function push(location, onResolve, onReject) { Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject) if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch(err => err)
} }
......
module.exports = { module.exports = {
productionSourceMap: false, productionSourceMap: false,
assetsDir: "s", // assetsDir: "s",
configureWebpack: { // configureWebpack: {
externals: { // externals: {
vue: "Vue", // vue: "Vue",
vuex: "Vuex", // vuex: "Vuex",
"vue-router": "VueRouter", // "vue-router": "VueRouter",
"element-ui": "ELEMENT", // "element-ui": "ELEMENT",
}, // },
}, // },
lintOnSave: false, lintOnSave: false,
devServer: { devServer: {
inline: true, inline: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment