nuxt-visitors 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-visitors",
3
3
  "configKey": "visitors",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -5,8 +5,12 @@ const module = defineNuxtModule({
5
5
  name: "nuxt-visitors",
6
6
  configKey: "visitors"
7
7
  },
8
- setup(_options, _nuxt) {
8
+ setup(_options, nuxt) {
9
9
  const resolver = createResolver(import.meta.url);
10
+ nuxt.options = nuxt.options || {};
11
+ nuxt.options.nitro = nuxt.options.nitro || {};
12
+ nuxt.options.nitro.experimental = nuxt.options.nitro.experimental || {};
13
+ nuxt.options.nitro.experimental.websocket = true;
10
14
  addImportsDir(resolver.resolve("runtime/composables"));
11
15
  addServerHandler({
12
16
  route: "/api/_visitors_/ws",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-visitors",
3
- "version": "1.0.0",
4
- "description": "My new Nuxt module",
3
+ "version": "1.0.1",
4
+ "description": "Add real-time visitor tracking to your Nuxt app with one line of code. WebSocket made easy",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "bugs": {