Skip to content

Commit

Permalink
fix: build issues with mf prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-verdes committed Nov 14, 2024
1 parent 9e7e172 commit c28dc12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion custom-elements-manifest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export default {
}

const tagNameWithoutPrefix = path.basename(importPath, '.component.ts');
const tagName = 'sl-' + tagNameWithoutPrefix;
const isMf = tagNameWithoutPrefix.startsWith('mf-');
const prefix = isMf ? '' : 'sl-';
const tagName = prefix + tagNameWithoutPrefix;

classDoc.tagNameWithoutPrefix = tagNameWithoutPrefix;
classDoc.tagName = tagName;
Expand Down
3 changes: 2 additions & 1 deletion docs/_includes/component.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{% extends "default.njk" %}

{# Find the component based on the `tag` front matter #}
{% set component = getComponent('sl-' + page.fileSlug) %}
{% set fileName = page.fileSlug if "mf-" in page.fileSlug else 'sl-' + page.fileSlug %}
{% set component = getComponent(fileName) %}

{% block content %}
{# Determine the badge variant #}
Expand Down

0 comments on commit c28dc12

Please sign in to comment.