I'm trying to use urlJoin in a Vue
single file component. I don't use a compiler and to load the Vue
file I use httpVueLoader
.
When I do this:
<script>
import urlJoin from 'https://cdn.skypack.dev/url-join';
module.exports = { ...
The browser complains:
SyntaxError: Cannot use import statement outside a module
Adding type="module"
changes nothing, still the same error.
Is it possible to use it this way?
You can't use it like that when using vue with npm
with npm:
Usage:
The way you are using is not for npm check docs: https://www.skypack.dev/view/url-join