vite.config.ts
import htmlConfig from 'vite-plugin-html-config';
const htmlConfigs = htmlConfig({
headScripts: [
{
src: 'js/cdn.jsdelivr.net_npm_luckysheet@latest_dist_plugins_js_plugin.js'
},
{
src: 'js/cdn.jsdelivr.net_npm_luckysheet@latest_dist_luckysheet.umd.js'
},
],
links: [
{
rel: 'stylesheet',
href: 'js/cdn.jsdelivr.net_npm_luckysheet@latest_dist_assets_iconfont_iconfont.css'
},
{
rel: 'stylesheet',
href: 'js/cdn.jsdelivr.net_npm_luckysheet@latest_dist_css_luckysheet.css'
},
{
rel: 'stylesheet',
href: 'js/cdn.jsdelivr.net_npm_luckysheet@latest_dist_plugins_css_pluginsCss.css'
},
{
rel: 'stylesheet',
href: 'js/cdn.jsdelivr.net_npm_luckysheet@latest_dist_plugins_plugins.css'
},
]
});
效果
文章来源:https://www.toymoban.com/news/detail-691293.html
文章来源地址https://www.toymoban.com/news/detail-691293.html
到了这里,关于vite.config.ts 自动导入静态资源 或 cdn资源的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!