Skip to content

Commit 7078630

Browse files
authored
Merge pull request #147 from richardhj/patch-1
Add note on using build manglers
2 parents d6f4143 + ed3f34a commit 7078630

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/_guide/you-will-need.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ Catalyst uses modern browser standards, and so requires evergreen browsers or ma
1818
- [`MutationObserver`](https://caniuse.com/#search=MutationObserver). [`mutation-observer`](https://github.com/webmodules/mutation-observer) can polyfill this.
1919

2020
Please note this list may increase over time. Catalyst will never ship with polyfills that add missing browser functionality, but will continue to use the latest Web Standards, and so may require more polyfills as new releases come out.
21+
22+
### Build considerations
23+
24+
When using build tools, some JavaScript minifiers modify the class name that Catalyst relies on. You know you have an issue if you encounter the error `"c" is not a valid custom element name`.
25+
26+
A best practice is to allow class names that end with `Element`. For instance, for Terser, you can use the following config: `{ keep_classnames: /Element$/ }`

0 commit comments

Comments
 (0)