Hi! I’ve been really looking for an answer to this one on my own and I come to the community because I’m out of options So thanks in advance for any hints.
I’m trying to import AOS into my project.
So I went ahead and installed it:
npm install --save aos@next
and then added this to my script.js in assets
import AOS from 'aos';
import 'aos/dist/aos.css';
AOS.init();
Finally I added this to my footer:
{{ $script := resources.Get "js/script.js" | minify}}
<script src="{{ $script.Permalink }}"></script>
All I’m getting in the console is this:
Uncaught SyntaxError: Cannot use import statement outside a module
Help? What am I doing wrong?