There's a mismatch in the docs between the text and code sample. The text suggests that libraries need imported and requiring it while the code only imports it. Which is correct?
https://gridsome.org/docs/assets-scripts#using-an-external-library
If you want to use a external javascript library inside your component you can do so by importing the component and requiring it once vue components are mounted.
...
import moment from 'moment';