首页 > 其他分享 >ant 引入cdn 和解决首页访问出现很多预加载文件的问题

ant 引入cdn 和解决首页访问出现很多预加载文件的问题

时间:2024-02-17 09:05:16浏览次数:22  
标签:滚动条 cdn ant scrollbar 10px webkit config options 加载

vue.config.js

module.exports = {
  // 解决首页访问出现很多预加载文件的问题
  chainWebpack: config => {
    // 移除 prefetch 插件
    config.plugins.delete('prefetch')
 
    // 或者
    // 修改它的选项:
    // config.plugin('prefetch').tap(options => {
    //   options[0].fileBlacklist = options[0].fileBlacklist || []
    //   options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
    //   return options
    // })
  },

  // transpileDependencies: ['/@yabby-business/'],
  lintOnSave: false,

configureWebpack:{
  externals: {  
    vue: 'Vue',
    'moment': 'moment',
    'ant-design-vue': "antd"

  },
  resolve:{
    alias:{
      'assets':'@/assets',
      'common':'@/common',
      'components':'@/components',
      'network':'@/network',
      'views':'@/views',
    }
  }
},
devServer: {
  port: 11911
  },
  // runtimeCompiler: true,

  
}

 index.html

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link rel="icon" href="https://online-education.codemao.cn/crm/2/customer/favicon.ico">
  <title>测试平台</title>

<!-- cdn引入组件库 -->
<!-- ant -->
<!-- <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/material-design-icons.css"> -->


  <!-- 滑动条样式  -->
  <style type="text/css">
    body {
      margin: 0;
    }
    ::-webkit-scrollbar {
      /*滚动条整体样式*/
      width: 10px;
    }
    ::-webkit-scrollbar-thumb {
      /*滚动条里面小方块*/
      -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
      background: #e2e2e1;
      border-radius: 10px;
      height: 10px;
    }
    ::-webkit-scrollbar-track {
      /*滚动条里面轨道*/
      -webkit-box-shadow: inset 0 0 5px rgba(238, 238, 238, 0.2);
      background: #EDEDED;
    }
  </style>
</head>

<body>
  <noscript>
    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
        Please enable it to continue.</strong>
  </noscript>
  <div id="app"></div>
  <!-- built files will be auto injected -->
  <!-- Vue.js CDN -->
  <script src="https://unpkg.com/[email protected]/dist/vue.min.js"></script>
  <!-- ant -->
  <script src="http://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/ant-design-vue/1.6.4/antd.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/antd.min.js"></script>
</body>

</html>

 

https://www.cnblogs.com/clors/p/13267684.html

标签:滚动条,cdn,ant,scrollbar,10px,webkit,config,options,加载
From: https://www.cnblogs.com/kaibindirver/p/18017689

相关文章

  • Python 机器学习 模型保存和加载
    ​ Python机器学习中,模型保存和加载是两个非常重要的操作。模型保存可以将训练好的模型保存到文件,以便以后使用。模型加载可以将保存的文件加载到内存,以便进行预测或评估。最常用保存和加模型的库包括pickle和joblib,另外在使用特定的机器学习库,如scikit-learn、TensorFlow或Py......
  • 博客园跳转编辑页面没有重新加载页面 pushState
    博客园前端是用angular写的全局搜索pushState,打断点,可以看到 pushState main.6267e7d35558bee5.is:1gomain.6267e7d35558bee5.js:1setBrowserUrl main.6267e7d35558bee5.js:1 setBrowserUrl(p,I){constQ=this.urlSerializer.serialize(p)......
  • 初中英语优秀范文100篇-082I want to volunteer in a nursing home-我想在养老院做志
    PDF格式公众号回复关键字:SHCZFW082记忆树1Haveyoueverbeenavolunteerbefore?翻译你以前做过志愿者吗?简化记忆做过句子结构整个句子是一个疑问句,因为它以助动词“have”开头,并且句子的结尾是问号。主语you-句子的主语是人称代词助动词Have-现在完成时......
  • Semantic Kernel + 通义千问:借助 one-api 调用阿里云灵积 DashScope api
    one-api相当于是一个兼容OpenAIapi的api网关(针对api的反向代理),借助one-api可以通过已有的OpenAI客户端调用非OpenAI大模型的api,比如通义千问。DashScope是阿里云提供的模型服务灵积的英文名称,这里通过调用DashScopeapi使用通义千问qwen-max大模型。以容器......
  • dlt开源数据加载工具
    dlt是一个开源数据加载工具,基于python开发特点一个库 dlt就是一个python包,其他地方需要我们自己开发非黑盒系统 我们可以基于代码灵活的进行自定义开发基于乘法的玩法,而不是加法自动代码生成 包含了类似dbt的一些处理cli基于python的玩法 dlt对于数据的处理是基于......
  • 实现阿里云模型服务灵积 DashScope 的 Semantic Kernel Connector
    SemanticKernel内置的IChatCompletionService实现只支持OpenAI与AzureOpenAI,而我却打算结合DashScope(阿里云模型服务灵积)学习SemanticKernel。于是决定自己动手实现一个支持DashScope的SemanticKernelConnector——DashScopeChatCompletionService,实现......
  • Linux下指定so动态库的加载路径的5种方法
    搜索的先后顺序是:编译目标代码时指定的动态库搜索路径;环境变量LD_LIBRARY_PATH指定的动态库搜索路径;配置文件/etc/ld.so.conf中指定的动态库搜索路径;默认的动态库搜索路径/lib;默认的动态库搜索路径/usr/lib。将库文件放置在对应的路径中,运行时就可以搜索到了。例1:通过gcc......
  • 初步体验通过 Semantic Kernel 与自己部署的通义千问开源大模型进行对话
    春节之前被SemanticKernel所吸引,开始了解它,学习它。在写这篇博文之前读了一些英文博文,顺便在这里分享一下:IntrotoSemanticKernel–PartOneIntrotoSemanticKernel–PartTwoBuildacustomCopilotexperiencewithyourprivatedatausingandKernelMemory......
  • 使用FluentScheduler和IIS预加载在asp.net中实现定时任务管理
    FluentScheduler介绍github地址:https://github.com/fluentscheduler/FluentSchedulerFluentScheduler是一个简单的任务调度框架,使用起来非常方便,这个框架也是我在搜索iis预加载的时候偶然间发现的,立马拿来试用一下,感觉爽呆了,当然还有Quarz.Net之类的其他任务管理框架,不过看配置......
  • P5026 Lycanthropy
    原题链接差分分为传递和作用两部分本题而言,k的传递是线性的k的作用是前一个点到这个点的斜率code#include<bits/stdc++.h>usingnamespacestd;intheight=0;//每个点的水高/水深intk[1070000]={0};//会对x点前后v个区间产生影响intstart=30000;//最大3vintmain()......