related configuration:
:/var/website/test
:
compiled
source
components
public
public.vue
static
image
test.png
plugins
// ...
static
suppose that in a source/components/public/public.vue
file, a file is introduced through 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
after being packaged, the resource cannot be accessed!
how does webpack handle the loading of resource files introduced through js
?