dargmuesli / nuxt-cookie-control

A highly configurable cookie banner for Nuxt.
MIT License
229 stars 43 forks source link

feat(types): types generator and CookieID string literal #210

Closed BlueBazze closed 4 months ago

BlueBazze commented 4 months ago

PR for #209

📚 Description

Typing for projects' cookies.

A nice to have feature. Allowing the users to type their cookie references. And might be able to be used as typing for cookiesEnabledIds etc..

Also added a nuxt hook listener to update the templates when the nuxt config is being updated while the dev server is running.

📝 Checklist

BlueBazze commented 4 months ago

I tried making sure the module would could build correctly. But the following error was thrown.

 ERROR  Cannot find module '/home/tbj/Documents/nuxt-cookie-control/dist/runtime/types' imported from /home/tbj/Documents/nuxt-cookie-control/dist/module.mjs                                              11:56:23 AM
  at finalizeResolution (node:internal/modules/esm/resolve:264:11)
  at moduleResolve (node:internal/modules/esm/resolve:924:10)
  at defaultResolve (node:internal/modules/esm/resolve:1148:11)
  at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
  at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
  at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
  at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
  at link (node:internal/modules/esm/module_job:86:36)

Tried checking out to the current master commit, and the same error was thrown. So i don't believe this is caused by anything i committed.