sweet-modal-vue icon indicating copy to clipboard operation
sweet-modal-vue copied to clipboard

Doese work with Nuxt

Open husayt opened this issue 6 years ago • 5 comments

I spent whole last night trying to use it with Nuxt. It just wouldn't work.

husayt avatar Mar 01 '18 08:03 husayt

This worked for me

plugins/sweet-modal.js import Vue from 'vue' import SweetModal from 'sweet-modal-vue/src/plugin.js' Vue.use(SweetModal)

"/src" is missing on Install Globally doc.

nuxt.config.js modules: [ { src: '~plugins/sweet-modal', ssr: false } ... ],

mcombalicer avatar Mar 02 '18 15:03 mcombalicer

Thanks

On 2 Mar 2018 15:03, "Mark Combalicer" [email protected] wrote:

This worked for me

plugins/sweet-modal.js import Vue from 'vue' import SweetModal from 'sweet-modal-vue/src/plugin.js' Vue.use(SweetModal)

"/src" is missing on Install Globally doc.

nuxt.config.js modules: [ { src: '~plugins/sweet-modal', ssr: false } ... ],

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adeptoas/sweet-modal-vue/issues/60#issuecomment-369944799, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHXrMwpObX_UzSDPIZly1oe9WjFUvLzks5taV9CgaJpZM4SX6yj .

husayt avatar Mar 05 '18 02:03 husayt

This worked for me

plugins/sweet-modal.js import Vue from 'vue' import SweetModal from 'sweet-modal-vue/src/plugin.js' Vue.use(SweetModal)

"/src" is missing on Install Globally doc.

nuxt.config.js modules: [ { src: '~plugins/sweet-modal', ssr: false } ... ],

Don't add sweet modal configuration in nuxt modules. Instead add it in plugins:

plugins: [ { src: '~plugins/sweet-modal', ssr: false } ... ],

gbikas avatar Oct 28 '18 10:10 gbikas

I had to put <sweet-modal /> in a nuxt <no-ssr /> component to avoid virtual DOM issues.

(note for future ref)

<no-ssr>
  <sweet-modal>content</sweet-modal>
</no-ssr>

jevets avatar Dec 19 '18 16:12 jevets

This issue needs attention :)

aprilahijriyan avatar Jun 17 '21 10:06 aprilahijriyan