@tthr/vue 0.0.37 → 0.0.38
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/nuxt/module.js +3 -15
- package/nuxt/module.ts +2 -15
- package/package.json +1 -4
package/nuxt/module.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* Environment variables (in .env):
|
|
19
19
|
* - TETHER_API_KEY: Your project's API key (required, kept server-side)
|
|
20
20
|
*/
|
|
21
|
-
import { defineNuxtModule, addPlugin, createResolver, addImports, addComponent, addServerHandler, addServerImports
|
|
21
|
+
import { defineNuxtModule, addPlugin, createResolver, addImports, addComponent, addServerHandler, addServerImports } from '@nuxt/kit';
|
|
22
22
|
export default defineNuxtModule({
|
|
23
23
|
meta: {
|
|
24
24
|
name: '@tthr/vue',
|
|
@@ -117,24 +117,12 @@ export default defineNuxtModule({
|
|
|
117
117
|
// Ensure the runtime files are transpiled
|
|
118
118
|
nuxt.options.build.transpile = nuxt.options.build.transpile || [];
|
|
119
119
|
nuxt.options.build.transpile.push('@tthr/vue');
|
|
120
|
-
// Create a virtual wrapper for the cron plugin to avoid absolute path issues in production
|
|
121
|
-
// The wrapper imports from the package export which gets resolved correctly at build time
|
|
122
|
-
const cronPluginWrapper = addTemplate({
|
|
123
|
-
filename: 'tether/cron-plugin.mjs',
|
|
124
|
-
write: true,
|
|
125
|
-
getContents: () => `
|
|
126
|
-
// Virtual wrapper for Tether cron plugin
|
|
127
|
-
// This ensures the import path is resolved correctly in production builds
|
|
128
|
-
import cronPlugin from '@tthr/vue/nuxt/cron-plugin';
|
|
129
|
-
export default cronPlugin;
|
|
130
|
-
`.trim(),
|
|
131
|
-
});
|
|
132
120
|
// Add Nitro plugin for cron WebSocket connection
|
|
133
121
|
// This auto-connects to Tether when the server starts
|
|
134
122
|
nuxt.hook('nitro:config', (nitroConfig) => {
|
|
135
123
|
nitroConfig.plugins = nitroConfig.plugins || [];
|
|
136
|
-
// Use
|
|
137
|
-
nitroConfig.plugins.push(
|
|
124
|
+
// Use direct path - Nitro will handle the #imports resolution at build time
|
|
125
|
+
nitroConfig.plugins.push(resolver.resolve('./runtime/server/plugins/cron.js'));
|
|
138
126
|
// Ensure Nitro inlines and transpiles the plugin from node_modules
|
|
139
127
|
nitroConfig.externals = nitroConfig.externals || {};
|
|
140
128
|
nitroConfig.externals.inline = nitroConfig.externals.inline || [];
|
package/nuxt/module.ts
CHANGED
|
@@ -138,25 +138,12 @@ export default defineNuxtModule<TetherModuleOptions>({
|
|
|
138
138
|
nuxt.options.build.transpile = nuxt.options.build.transpile || [];
|
|
139
139
|
nuxt.options.build.transpile.push('@tthr/vue');
|
|
140
140
|
|
|
141
|
-
// Create a virtual wrapper for the cron plugin to avoid absolute path issues in production
|
|
142
|
-
// The wrapper imports from the package export which gets resolved correctly at build time
|
|
143
|
-
const cronPluginWrapper = addTemplate({
|
|
144
|
-
filename: 'tether/cron-plugin.mjs',
|
|
145
|
-
write: true,
|
|
146
|
-
getContents: () => `
|
|
147
|
-
// Virtual wrapper for Tether cron plugin
|
|
148
|
-
// This ensures the import path is resolved correctly in production builds
|
|
149
|
-
import cronPlugin from '@tthr/vue/nuxt/cron-plugin';
|
|
150
|
-
export default cronPlugin;
|
|
151
|
-
`.trim(),
|
|
152
|
-
});
|
|
153
|
-
|
|
154
141
|
// Add Nitro plugin for cron WebSocket connection
|
|
155
142
|
// This auto-connects to Tether when the server starts
|
|
156
143
|
nuxt.hook('nitro:config', (nitroConfig) => {
|
|
157
144
|
nitroConfig.plugins = nitroConfig.plugins || [];
|
|
158
|
-
// Use
|
|
159
|
-
nitroConfig.plugins.push(
|
|
145
|
+
// Use direct path - Nitro will handle the #imports resolution at build time
|
|
146
|
+
nitroConfig.plugins.push(resolver.resolve('./runtime/server/plugins/cron.js'));
|
|
160
147
|
|
|
161
148
|
// Ensure Nitro inlines and transpiles the plugin from node_modules
|
|
162
149
|
nitroConfig.externals = nitroConfig.externals || {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tthr/vue",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "Tether Vue/Nuxt SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,9 +16,6 @@
|
|
|
16
16
|
},
|
|
17
17
|
"./nuxt": {
|
|
18
18
|
"import": "./nuxt/module.ts"
|
|
19
|
-
},
|
|
20
|
-
"./nuxt/cron-plugin": {
|
|
21
|
-
"import": "./nuxt/runtime/server/plugins/cron.js"
|
|
22
19
|
}
|
|
23
20
|
},
|
|
24
21
|
"files": [
|