vue-toastr icon indicating copy to clipboard operation
vue-toastr copied to clipboard

Vue 3 Issue

Open Marlight96 opened this issue 4 years ago • 11 comments
trafficstars

Hello,

when i use it in vue 3 i get the following error: Uncaught TypeError: Vue.extend is not a function at Object.VueToastr.install (vue-toastr.esm.js?025a:736) at Object.use (runtime-core.esm-bundler.js?5c40:2945) at eval (main.js?56d7:8) at Module../src/main.js (app.js:1366) at __webpack_require__ (app.js:854) at fn (app.js:151) at Object.1 (app.js:1475) at __webpack_require__ (app.js:854) at checkDeferredModules (app.js:46) at app.js:994

// ... import VueToastr from "vue-toastr"; // ... const app = createApp(App).use(VueToastr).use(store).use(router);

Marlight96 avatar Jan 27 '21 21:01 Marlight96

This plugin has not been upgraded for vue.js 3

s4l1h avatar Jan 27 '21 23:01 s4l1h

Is there scope for it to be updated?

u01jmg3 avatar Jul 07 '21 10:07 u01jmg3

@u01jmg3 I am working on it.

s4l1h avatar Jul 27 '21 23:07 s4l1h

I have created a dev branch for vue.js 3 https://github.com/s4l1h/vue-toastr/tree/dev-v3 your contribution is welcome. There are problems about vite bundler and typescript types publishing.

s4l1h avatar Aug 04 '21 02:08 s4l1h

[UP] A release date planned for VueJS 3?

ValentinRgt avatar Oct 03 '21 14:10 ValentinRgt

@ValentinRgt @u01jmg3 @Marlight96

I have just published a version of the library for Vue.js 3. ( You can install [email protected] version. )

There is no breaking changes. The api is as same as v2.

I have created a demo https://codesandbox.io/s/quizzical-grass-eb62u

https://github.com/s4l1h/vue-toastr/tree/dev-v3 https://www.npmjs.com/package/vue-toastr/v/3.0.3

s4l1h avatar Feb 12 '22 05:02 s4l1h

Thanks @s4l1h - great work

Previously I was using vue-toastr.common.js - what's the equivalent in your dev-v3 branch?

  1. vue-toastr.cjs.js
  2. vue-toastr.es.js
  3. vue-toastr.iife.js
  4. vue-toastr.umd.js

u01jmg3 avatar Feb 12 '22 11:02 u01jmg3

@u01jmg3 it should be https://github.com/s4l1h/vue-toastr/blob/dev-v3/dist/vue-toastr.cjs.js https://unpkg.com/browse/[email protected]/dist/vue-toastr.cjs.js

Don't forget to import style.css file.

https://github.com/s4l1h/vue-toastr/blob/dev-v3/dist/style.css

s4l1h avatar Feb 12 '22 23:02 s4l1h

Is sourceMappingURL=vue-toastr.cjs.js.map available?

u01jmg3 avatar Feb 13 '22 09:02 u01jmg3

@u01jmg3 We don't publish with source map. https://github.com/s4l1h/vue-toastr/blob/master/.gitignore#L5 Should we publish it?

s4l1h avatar Feb 20 '22 22:02 s4l1h

After looking at other repos it appears it is not common practice to publish the source map. Thanks for following up.

u01jmg3 avatar Feb 28 '22 10:02 u01jmg3