VinceG / vue-click-away

Vue 3.0 Compatible Click Away Directive
MIT License
108 stars 14 forks source link

SSR: Failed to resolve directive: click-away #25

Open stuartcusackie opened 1 year ago

stuartcusackie commented 1 year ago

I'm seeing this error when running node ssr locally: SSR: Failed to resolve directive: click-away

The directive works however.

I wonder if it is related to this?

fahdaddi commented 1 year ago

facing the same issue when building my app in SSR mode + it throws error: Cannot read properties of undefined (reading 'getSSRProps')

BuptStEve commented 4 hours ago
// vite.config.ts
export default defineConfig({
  plugins: [
    vue({
      template: {
        compilerOptions: {
          directiveTransforms: {
            'click-away': () => ({ props: [] }),
          },
        },
      },
    }),
});