相关配置:项目路径:/var/website/test
目录结构:
compiled
source
components public
public.vue static
image
test.png
plugins // ...static假设在一个 source/components/public/public.vue 文件中,通过 js 引入了一个文件:<template>
<section>
<img ref='test' src='' class='image'>
</section></template><script>export default { name: '' ,
mounted () { this.$refs.test.src='../../static/image/test.png';
}
};</script>webpack 打包后,访问不到资源!!webpack 如何处理通过 js 引入的资源文件加载问题??
添加回答
举报
0/150
提交
取消