You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which scope/s are relevant/related to the feature request?
Don't known / other
Information
Overview
Nuxt has an awesome way to provide support for Modules.
External modules or plugins can be written to extend the default Nuxt functionality.
I think supporting this for Analog would take this project to the next level.
Since Nuxt is also based on Nitro and Vite I think taking a look at how it is implemented there can be helpful.
To understand how Modules work for the developer we can read this guide here: https://nuxt.com/docs/guide/going-further/modules
The specific use case I have:
I would love to easily support a Prismic or Strapi API for my Analog project so a non technical author can just log in and start creating posts.
Example
I can simply run the following command.
yarn add --dev @analogjs/strapi
Then, add @analogjs/strapi to the [modules] section of our Analog Vite plugin:
@Component({selector: 'blog',standalone: true,imports: [AsyncPipe],template: ` <!-- do something with the data returned here --> {{ blogArticle$ | async }} `,})exportdefaultclassBlogComponent{private_slug=inject(ActivatedRoute).snapshot.paramMap.get('slug')publicblogArticle$=injectStrapi().find('blogArticle',this._slug)}
## ClosingthoughtsOfcoursethisneedsalotofconsiderationandweneedtoexploreifthisisevenpossiblewithAngular.ButIthoughtIwouldcreatethisissuetostartadiscussionandgetpeople's input, because I believe the potential upside that could come from this is very big.### Describe any alternatives/workarounds you'recurrentlyusingCurrentlynotpossible
### IwouldbewillingtosubmitaPRtofixthisissue-[X]Yes-[]No
This discussion was converted from issue #277 on March 27, 2024 03:20.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Which scope/s are relevant/related to the feature request?
Don't known / other
Information
Overview
Nuxt has an awesome way to provide support for Modules.
External modules or plugins can be written to extend the default Nuxt functionality.
I think supporting this for Analog would take this project to the next level.
Since Nuxt is also based on Nitro and Vite I think taking a look at how it is implemented there can be helpful.
To understand how Modules work for the developer we can read this guide here:
https://nuxt.com/docs/guide/going-further/modules
From what I understand so far, under the hood Nuxt uses the following unjs packages to support this functionality:
https://github.com/unjs/unctx
https://github.com/unjs/hookable
https://github.com/unjs/unplugin (this might not even be needed since Analog is Vite only)
The specific use case I have:
I would love to easily support a Prismic or Strapi API for my Analog project so a non technical author can just log in and start creating posts.
Example
I can simply run the following command.
Then, add @analogjs/strapi to the [modules] section of our Analog Vite plugin:
And to the main.ts bootstraping logic.
And be able to use it in a component like so:
Beta Was this translation helpful? Give feedback.
All reactions