@dynect/base 0.19.0 → 0.19.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/module.ts +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynect/base",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Reusable Nuxt base module — components, composables, utils, plugins and i18n from the Dynect design system.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/module.ts CHANGED
@@ -188,6 +188,15 @@ export default defineNuxtModule<DynectBaseOptions>({
188
188
 
189
189
  await installModule('@pinia/nuxt');
190
190
 
191
+ // ── CJS dependency pre-bundling ──────────────────────────────────────────
192
+ // bind-event-listener is CJS-only (no ESM export map). Force Vite's esbuild
193
+ // pre-bundler to convert it so named imports like { bind } work at runtime.
194
+ nuxt.options.vite.optimizeDeps ??= {};
195
+ nuxt.options.vite.optimizeDeps.include ??= [];
196
+ if (!nuxt.options.vite.optimizeDeps.include.includes('bind-event-listener')) {
197
+ nuxt.options.vite.optimizeDeps.include.push('bind-event-listener');
198
+ }
199
+
191
200
  // ── CSS ──────────────────────────────────────────────────────────────────
192
201
  const cssPath = isStandalone ? resolver.resolve('./runtime/assets/css/main.css') : resolver.resolve('../../../app/assets/css/main.css');
193
202