@nuxtjs/mdc 0.9.1 → 0.9.2

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxtjs/mdc",
3
3
  "configKey": "mdc",
4
- "version": "0.9.1",
4
+ "version": "0.9.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -331,7 +331,11 @@ const module = defineNuxtModule({
331
331
  }
332
332
  addTemplate({
333
333
  filename: "mdc-image-component.mjs",
334
- getContents: ({ app }) => app.components.some((c) => c.pascalName === "NuxtImg" && !c.filePath.includes("nuxt/dist/app")) ? 'export { NuxtImg } from "#components"' : 'export default "img"'
334
+ write: true,
335
+ getContents: ({ app }) => {
336
+ const image = app.components.find((c) => c.pascalName === "NuxtImg" && !c.filePath.includes("nuxt/dist/app"));
337
+ return image ? `export { default } from "${image.filePath}"` : 'export default "img"';
338
+ }
335
339
  });
336
340
  extendViteConfig((config) => {
337
341
  const include = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtjs/mdc",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Nuxt MDC module",
5
5
  "repository": "nuxt-modules/mdc",
6
6
  "license": "MIT",