metaowl 0.2.3 → 0.2.4

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.
@@ -67,10 +67,12 @@ write('package.json', JSON.stringify({
67
67
  write('vite.config.js',
68
68
  `import { metaowlConfig } from 'metaowl/vite'
69
69
 
70
- export default metaowlConfig({
71
- componentsDir: 'src/components',
72
- pagesDir: 'src/pages'
73
- })
70
+ export default async () => {
71
+ return metaowlConfig({
72
+ componentsDir: 'src/components',
73
+ pagesDir: 'src/pages'
74
+ })
75
+ }
74
76
  `)
75
77
 
76
78
  // --- eslint.config.js ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metaowl",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Lightweight meta-framework for Odoo OWL — file-based routing, app mounting, Fetch helper, Cache, Meta tags, SSG generator, and a Vite plugin.",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/vite/plugin.js CHANGED
@@ -238,12 +238,14 @@ export async function metaowlPlugin(options = {}) {
238
238
  * Usage in vite.config.js:
239
239
  *
240
240
  * import { metaowlConfig } from 'metaowl/vite'
241
- * export default metaowlConfig({
242
- * server: { port: 3333 },
243
- * preview: { port: 8095 },
244
- * envPrefix: 'MY_',
245
- * vendorPackages: ['@odoo/owl', 'apexcharts']
246
- * })
241
+ * export default async () => {
242
+ * return metaowlConfig({
243
+ * server: { port: 3333 },
244
+ * preview: { port: 8095 },
245
+ * envPrefix: 'MY_',
246
+ * vendorPackages: ['@odoo/owl', 'apexcharts']
247
+ * })
248
+ * }
247
249
  *
248
250
  * @param {object} [options]
249
251
  * @param {object} [options.server] - Vite server config overrides (merged with defaults).
@@ -252,13 +254,12 @@ export async function metaowlPlugin(options = {}) {
252
254
  * @param {*} [options.*] - All other options forwarded to metaowlPlugin().
253
255
  * @returns {import('vite').UserConfig}
254
256
  */
255
- export async function metaowlConfig(options = {}) {
257
+ export function metaowlConfig(options = {}) {
256
258
  const { server, preview, build, ...metaowlOptions } = options
257
- const plugins = await metaowlPlugin(metaowlOptions)
258
259
  return {
259
260
  server: { port: 3000, strictPort: true, host: true, ...server },
260
261
  preview: { port: 4173, strictPort: true, ...preview },
261
262
  ...(build ? { build } : {}),
262
- plugins
263
+ plugins: [metaowlPlugin(metaowlOptions)]
263
264
  }
264
265
  }