Skip to content

Commit e20173a

Browse files
authored
Add note on using build manglers
1 parent 11868e5 commit e20173a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

docs/_guide/your-first-component.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ By convention Catalyst controllers end in `Element`; Catalyst will omit this whe
3333
Remember! A class name _must_ include at least two CamelCased words (not including the `Element` suffix). One-word elements will raise exceptions. Example of good names: `UserListElement`, `SubTaskElement`, `PagerContainerElement`
3434
{% endcapture %}{% include callout.md %}
3535

36+
{% capture callout %}
37+
When using build tools, some JavaScript minifiers might modify the class name that Catalyst relies on. A best-practice is to allow classnames that end with `Element`. In particular, for Terser, you can use the following config: `{ keep_classnames: /Element$/ }`
38+
{% endcapture %}{% include callout.md %}
39+
3640

3741
### What does `@controller` do?
3842

0 commit comments

Comments
 (0)