@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.
- package/package.json +1 -1
- package/src/module.ts +9 -0
package/package.json
CHANGED
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
|
|