epicmaxco / epic-spinners

Easy to use css spinners collection with Vue.js integration
https://epic-spinners.epicmax.co
3.84k stars 357 forks source link

Work only if component is registered globally #57

Open aless673 opened 1 year ago

aless673 commented 1 year ago

Error with local component registration

Uncaught ReferenceError: require is not defined at ./node_modules/epic-spinners/dist/cjs/index.js

<template>
  <div id="app">
    <atom-spinner :animation-duration="1000" :size="60" color="#ff1d5e" />
  </div>
</template>

<script>
import { AtomSpinner } from 'epic-spinners'

export default {
  components: {
    AtomSpinner,
  },
}
</script>

But it works with global registration

import { HalfCircleSpinner } from 'epic-spinners'

cont  app = createApp({});
app.component('half-circle-spinner', HalfCircleSpinner)