u3u / vue-hooks

⚡️Awesome Vue Hooks
https://vue-hooks.netlify.com
MIT License
493 stars 33 forks source link

build fail due to duplication with dayjs #205

Open Goldziher opened 4 years ago

Goldziher commented 4 years ago

Hi there. First thanks for this nice package. We are using it for the vuex bindings only though, and the added stuff is creating some problems:

ERROR in /var/www/yoda/node_modules/@u3u/vue-hooks/node_modules/dayjs/locale/index.d.ts(10,12):

10:12 Duplicate identifier 'locale'.

     8 |   const locale: locale.Locale

     9 | 

  > 10 |   export = locale

       |            ^

    11 | }

    12 | 

 error  in /var/www/yoda/node_modules/dayjs/locale/index.d.ts

ERROR in /var/www/yoda/node_modules/dayjs/locale/index.d.ts(10,12):

10:12 Duplicate identifier 'locale'.

     8 |   const locale: locale.Locale

     9 | 

  > 10 |   export = locale

       |            ^

    11 | }

    12 | 

I'd suggest moving dayjs into a peer dependency, or completely removing this hook from the package - after all, users might use a different library or a native implementation etc.

leiyunkang7 commented 3 years ago

mark,我们项目也遇到这问题了

Ruslancic commented 2 years ago

+1