hypernym-studio / nuxt-gsap

GSAP module for Nuxt.
MIT License
290 stars 12 forks source link

gsap extraPlugins configuration throws error #49

Closed rowild closed 1 year ago

rowild commented 1 year ago

Steps to Reproduce

  1. Run npx nuxi@latest init <my-app>
  2. npm i -D @hypernym/nuxt-gsap
  3. Configure gsap extraPlugins in nuxt.config.ts:
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { 
    enabled: true 
  },
  modules: [
    "nuxt-directus",
    "@hypernym/nuxt-gsap"
  ],
  gsap: {
    extraPlugins: {
      flip: true,
      scrollTrigger: true,
      observer: true,
      scrollTo: true
    }
  }
})

Current Behavior

This throws an error in the nuxt.config.ts:

Argument of type '{ devtools: { enabled: boolean; }; modules: string[]; gsap: { extraPlugins: { flip: boolean; scrollTrigger: boolean; observer: boolean; scrollTo: boolean; }; }; }' is not assignable to parameter of type 'InputConfig<NuxtConfig, ConfigLayerMeta>'.
  Object literal may only specify known properties, and 'gsap' does not exist in type 'InputConfig<NuxtConfig, ConfigLayerMeta>

Expected Behavior

No error

Additional Details

Screenshot 2023-07-13 at 09 39 04

Version

{
  [...]
  "devDependencies": {
    "@hypernym/nuxt-gsap": "^2.2.2",
    "@nuxt/devtools": "latest",
    "@types/node": "^18.16.19",
    "nuxt": "^3.6.2"
  },
  "dependencies": {
    "gsap": "^3.12.2",
    "nuxt-directus": "^5.4.4"
  }
}
rowild commented 1 year ago

Moved to discussion.