vue-sticky-directive
vue-sticky-directive copied to clipboard
Uncaught SyntaxError: The requested module does not provide an export named 'default'
Importing vue-sticky-directive.min.js from CDN leads to:
"Uncaught SyntaxError: The requested module https://cdn.jsdelivr.net/npm/[email protected]/vue-sticky-directive.min.js does not provide an export named default" error in browser.
Here is the code in browser:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/vue-sticky-directive.min.js"></script>
<script type="module">
import Sticky from 'https://cdn.jsdelivr.net/npm/[email protected]/vue-sticky-directive.min.js';
Vue.directive('Sticky', Sticky);
...
<script>