Skip to content

Commit

Permalink
feat!: add support Nuxt 3
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Nuxt 2 module entry moved from `v-wave/nuxt` to `v-wave/nuxt/v2`
  • Loading branch information
justintaddei committed Dec 7, 2023
1 parent 7d20844 commit 639fb39
Show file tree
Hide file tree
Showing 7 changed files with 5,093 additions and 3,836 deletions.
5 changes: 0 additions & 5 deletions nuxt/index.cjs

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion nuxt/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "v-wave",
"configKey": "vWave",
"compatibility": {
"nuxt": "^3.0.0 || ^2.16.0",
"nuxt": "^3.0.0",
"bridge": true
}
}
14 changes: 14 additions & 0 deletions nuxt/v2/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const { resolve } = require('path')

module.exports = function nuxtVWave(moduleOptions) {
const options = Object.assign({}, this.options.vWave, moduleOptions)

this.addPlugin({
ssr: false,
src: resolve(__dirname, 'v2-plugin.js'),
fileName: 'v-wave-plugin.js',
options
})
}

module.exports.meta = require('../../package.json')
4 changes: 4 additions & 0 deletions nuxt/v2/v2-plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Vue from 'vue'
import VWave from 'v-wave'

Vue.use(VWave, <%= serialize(options) %>)
Loading

0 comments on commit 639fb39

Please sign in to comment.