W
W
WAYNEDEV2020-03-04 17:11:30
JavaScript
WAYNEDEV, 2020-03-04 17:11:30

How to include vue-suggestions in nuxt?

Hello!
When I try to connect nuxt via ssr, I get:
error unexpected token

With ssr: false, nuxt sees it just as a function.
Has anyone encountered this and found a solution?

Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
verstoff, 2020-03-04
@verstoff

Vue-suggestions exports a component, not a plugin.
You need to wrap the component in a plugin yourself and include it in the nuxt config:
https://nuxtjs.org/guide/plugins
Or import it directly in the component, as indicated in the Readme.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question