@studio-fes/layer-strapi 0.2.2 → 0.2.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @studio-fes/layer-strapi
2
2
 
3
+ ## 0.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - moved component and composable registration from plugin to modules for vue-strapi-blocks-renderer
8
+
3
9
  ## 0.2.2
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,22 @@
1
+ import { addComponent, addImports, defineNuxtModule } from '@nuxt/kit'
2
+
3
+ export default defineNuxtModule({
4
+ meta: {
5
+ name: 'vue-strapi-blocks-renderer',
6
+ },
7
+ setup() {
8
+ // Register the component
9
+ addComponent({
10
+ name: 'StrapiBlocks',
11
+ export: 'StrapiBlocks',
12
+ filePath: 'vue-strapi-blocks-renderer',
13
+ })
14
+
15
+ // Register composable
16
+ addImports({
17
+ name: 'useStrapiBlocksContext',
18
+ as: 'useStrapiBlocksContext',
19
+ from: 'vue-strapi-blocks-renderer',
20
+ })
21
+ },
22
+ })
package/nuxt.config.ts CHANGED
@@ -7,13 +7,6 @@ export default defineNuxtConfig({
7
7
  'nuxt-multi-cache',
8
8
  ],
9
9
 
10
- imports: {
11
- imports: [
12
- { name: 'useStrapiBlocksContext', from: 'vue-strapi-blocks-renderer' },
13
- { name: 'StrapiBlocks', from: 'vue-strapi-blocks-renderer', type: true },
14
- ],
15
- },
16
-
17
10
  runtimeConfig: {
18
11
  multiCacheEnabled: import.meta.env.NUXT_CACHE_ENABLED === 'true',
19
12
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@studio-fes/layer-strapi",
3
3
  "type": "module",
4
- "version": "0.2.2",
4
+ "version": "0.2.3",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev",
@@ -1,5 +0,0 @@
1
- import { StrapiBlocks } from 'vue-strapi-blocks-renderer'
2
-
3
- export default defineNuxtPlugin((nuxtApp) => {
4
- nuxtApp.vueApp.component('StrapiBlocks', StrapiBlocks)
5
- })