पाठ 23 / 30
SWC Plugins और Ecosystem
SWC के growing plugin ecosystem और capabilities को explore करें।
SWC plugins: Babel से कम
SWC के पास Babel से कम plugins हैं क्योंकि यह common features को natively cover करता है। लेकिन ecosystem बढ़ रहा है। Standard transpilation के लिए, SWC box के out से काम करता है।
Built-in बनाम plugin features
SWC में TypeScript, JSX, async/await, destructuring, और अधिकांश आधुनिक features natively शामिल हैं। Plugins edge cases को extend करते हैं या experimental features को जोड़ते हैं।
लापता features के लिए Babel को fallback करें
यदि आपको एक Babel plugin चाहिए जो SWC support नहीं करता है, तो पहले SWC को चलाएँ, फिर उस specific plugin के लिए Babel के through pipe करें। Rare, लेकिन कभी-कभी आवश्यक।