@tthr/vue 0.0.50 → 0.0.51

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.
Files changed (2) hide show
  1. package/nuxt/module.ts +6 -5
  2. package/package.json +1 -1
package/nuxt/module.ts CHANGED
@@ -154,10 +154,11 @@ export default defineNuxtModule<TetherModuleOptions>({
154
154
  nitroConfig.externals = nitroConfig.externals || {};
155
155
  nitroConfig.externals.inline = nitroConfig.externals.inline || [];
156
156
  nitroConfig.externals.inline.push('@tthr/vue');
157
- });
158
157
 
159
- // Get the absolute path to user's tether/functions/index file
160
- const tetherFunctionsPath = `${nuxt.options.rootDir}/tether/functions/index`;
158
+ // Add alias for user's tether functions so Nitro can resolve TypeScript
159
+ nitroConfig.alias = nitroConfig.alias || {};
160
+ nitroConfig.alias['#tether-functions'] = `${nuxt.options.rootDir}/tether/functions`;
161
+ });
161
162
 
162
163
  // Generate a server plugin to auto-register cron handlers from tether/functions
163
164
  // This runs at build time and creates a plugin that imports user's functions
@@ -173,8 +174,8 @@ export default defineNuxtModule<TetherModuleOptions>({
173
174
  import { defineNitroPlugin, registerCronHandler } from '@tthr/vue/nuxt/runtime/server/plugins/cron.js';
174
175
  import { useTetherServer } from '@tthr/vue/nuxt/runtime/server/utils/tether.js';
175
176
 
176
- // Import all functions from tether/functions
177
- import * as tetherFunctions from '${tetherFunctionsPath}';
177
+ // Import all functions from tether/functions using Nitro alias
178
+ import * as tetherFunctions from '#tether-functions';
178
179
 
179
180
  /**
180
181
  * Create a simple logger for function execution
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tthr/vue",
3
- "version": "0.0.50",
3
+ "version": "0.0.51",
4
4
  "description": "Tether Vue/Nuxt SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",