import{_ as n,o as a,c as s,f as t}from"./app.136d0839.js";const e={},p=t(`
有些内容不需要经过 webpack
模块化处理,则可以将这些内容放在 public
文件夹,构建后会直接复制到 dist
目录,所以你需要通过BASE_URL
来引入它们。
在 index.html
中需要设置:
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<template>
<img :src="\`\${publicPath}my-image.png\`" />
</template>
<script>
export default {
setup() {
return {
publicPath: process.env.BASE_URL,
};
},
};
</script>