相关配置:
项目路径:/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 引入的资源文件加载问题??
MMMHUHU
翻阅古今
30秒到达战场
随时随地看视频慕课网APP
相关分类