I need to import a file "js" from folder "public" in a vue component.
my Vue component:
<template>
<div>
<h2>Hello</h2>
</div>
</template>
<script>
import {myplugin} from "/public/vendor/jquery/jquery.min.js";
export default {
name: "pageone"
}
</script>
but i receive an error in compiling phase, can someone help me?
from '../../../public/vendor/jquery/jquery.min.js'vendorfolder in yourpublicfolder?jqueryis most likely also present already (depending on which version of Laravel/Laravel UI you're using). Include/require jquery via npm. laravel.com/docs/master/mix#working-with-scriptsimport {myplugin} fromis wrong. Should be something likeimport * as jQuery from ...