I try to import this package into my nuxt project. All my coding experiments can be found here. I will refer to different branches.
There are several ways to do so:
This way worked well. You can go to the uploading page via a button on a home page.
Until you manually refresh the page
Then you will get this error SyntaxError Cannot use import statement outside a module
The same error happens when you try to build it.
- Import it via plugins (like in plugin-use branch with or without vendor option in build)
I've got the same error.
- Import it via plugins with some options (like in plugin-options branch)
Then the package loads only when you refresh the page and only in dev mode.
If you will go to that button on a home page (referenced before) - there will be an empty page.
- Import it through modules (like in modules branch).
Then the nuxt cannot load at all, this error happens SyntaxError: Invalid or unexpected token
Could you comment on each method and why it doesn't work? How to import it correctly?