Tag

Babel

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 29, 2025 · Frontend Development

Implementing Vue‑Style Directives in React with a Babel Plugin

This article explores three approaches to bring Vue‑like directives such as r‑if and r‑for into React, compares their pros and cons, and provides a complete Babel plugin implementation that transforms custom JSX attributes into standard React conditional and list rendering syntax.

BabelDirectivesJSX
0 likes · 9 min read
Implementing Vue‑Style Directives in React with a Babel Plugin
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 8, 2025 · Frontend Development

auto-i18n-translation-plugins: Automatic Internationalization for Frontend Projects

This article introduces the auto-i18n-translation-plugins, a framework‑agnostic Vite/Webpack plugin that automatically extracts Chinese text from source code, replaces it with hash‑based $t calls, generates language packs, and seamlessly translates new or incremental strings using configurable translators such as Youdao or Google.

Babelautomationfrontend
0 likes · 18 min read
auto-i18n-translation-plugins: Automatic Internationalization for Frontend Projects
Sohu Tech Products
Sohu Tech Products
Feb 26, 2025 · Frontend Development

Automatically Adding Optional Chaining Operator via Babel Plugin to Prevent TypeError

An automatically applied Babel plugin scans JavaScript AST nodes and rewrites risky property accesses and logical‑AND chains into optional‑chaining expressions, letting developers prevent TypeError crashes without modifying source code, while offering include/exclude filters, optional short‑circuit optimization, and compatibility with older browsers via downstream transforms.

AST transformationBabelJavaScript
0 likes · 11 min read
Automatically Adding Optional Chaining Operator via Babel Plugin to Prevent TypeError
vivo Internet Technology
vivo Internet Technology
Jan 22, 2025 · Frontend Development

Developing a Babel Plugin to Automatically Add Optional Chaining (?.) and Prevent TypeError

The article explains how to create a custom Babel plugin that automatically transforms risky member and call expressions into optional‑chaining equivalents during bundling, using configurable include/exclude patterns and short‑circuit optimizations, thereby preventing TypeError in large JavaScript codebases while noting a modest bundle‑size increase.

BabelCode TransformationJavaScript
0 likes · 14 min read
Developing a Babel Plugin to Automatically Add Optional Chaining (?.) and Prevent TypeError
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 10, 2025 · Frontend Development

Deep Dive into Umi's useModel: Usage, Optimization, and Source Code Analysis

This article explores Umi's useModel lightweight state management solution, covering basic usage, performance optimizations with selectors, custom hooks, Babel plugin automation, and an in‑depth source code analysis, while also discussing its drawbacks and practical considerations for frontend projects.

BabelOptimizationReact
0 likes · 24 min read
Deep Dive into Umi's useModel: Usage, Optimization, and Source Code Analysis
Sohu Tech Products
Sohu Tech Products
Nov 20, 2024 · Frontend Development

JavaScript Pipeline Operator: Concepts, Drawbacks of Traditional Approaches, and Practical Usage

The JavaScript pipeline operator replaces cumbersome temporary variables, nested calls, and limited method chaining by letting developers chain regular, async, or generator functions directly, improving readability and maintainability, while Babel’s proposal‑hack plugin can be installed and configured now to start using it.

BabelCode readabilityJavaScript
0 likes · 3 min read
JavaScript Pipeline Operator: Concepts, Drawbacks of Traditional Approaches, and Practical Usage
Bilibili Tech
Bilibili Tech
Oct 15, 2024 · Frontend Development

AST‑Based Visual Programming for Vue SFC: Design, Implementation, and Demo

By binding a Vue single‑file component’s AST to a visual UI, this project parses templates with node‑html‑parser, transforms scripts via Babel, and processes styles with standard loaders, allowing developers to edit component properties visually, automatically regenerate synchronized source code, and preview changes, with a prototype demo and planned drag‑and‑drop, styling, state, AI, and CI/CD extensions.

ASTBabelVue
0 likes · 10 min read
AST‑Based Visual Programming for Vue SFC: Design, Implementation, and Demo
DeWu Technology
DeWu Technology
Sep 4, 2024 · Frontend Development

An Overview of Babel: Architecture, Transpilation Process, and ECMAScript Standardization

Babel is a micro‑kernel JavaScript transpiler that parses source code into an AST, lets plugins and presets transform it, and generates backward‑compatible code with optional source maps, while its runtime helpers, polyfills, and close alignment with the evolving ECMAScript specification ensure modern syntax works across legacy environments.

BabelECMAScriptJavaScript
0 likes · 23 min read
An Overview of Babel: Architecture, Transpilation Process, and ECMAScript Standardization
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 24, 2024 · Frontend Development

Using click-to-react-component to Quickly Locate React Component Source Code

This article explains how to efficiently locate and edit React component source files in large projects by using the click-to-react-component tool, covering installation, demo setup, interaction shortcuts, and the underlying mechanism that maps DOM elements to source code via React fiber nodes and VSCode links.

BabelReactVSCode
0 likes · 9 min read
Using click-to-react-component to Quickly Locate React Component Source Code
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 1, 2024 · Frontend Development

Understanding React Compiler: What It Is, How to Use It, and Its Impact

The article introduces the newly open‑sourced React Compiler, explains its underlying concepts and automatic memo optimization, provides step‑by‑step usage instructions with health‑check, ESLint and Babel plugins, and shares performance results from Meta’s production apps.

BabelCompilerESLint
0 likes · 6 min read
Understanding React Compiler: What It Is, How to Use It, and Its Impact
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 16, 2024 · Frontend Development

Rax2Taro: Building a Compiler to Convert Rax Components into Taro

This article walks through the design and implementation of a compiler that automatically transforms Rax components into Taro components, covering the background, Babel‑based AST processing, import rewriting, component attribute mapping, project structure, automated end‑to‑end testing, and future enhancements.

ASTBabelCompiler
0 likes · 15 min read
Rax2Taro: Building a Compiler to Convert Rax Components into Taro
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 23, 2023 · Frontend Development

How Ant Design, Arco Design, and Semi Design Package Their React Component Libraries

This article examines the directory structures, package.json entries, and build scripts of popular React component libraries—Ant Design, Arco Design, and Semi Design—explaining how they generate CommonJS, ES Module, and UMD bundles using tools like tsc, Babel, Webpack, and Gulp, and shows how to apply the same approach when creating your own library.

BabelGulpReact
0 likes · 8 min read
How Ant Design, Arco Design, and Semi Design Package Their React Component Libraries
TAL Education Technology
TAL Education Technology
Jun 15, 2023 · Frontend Development

Automating Log Insertion in Frontend Projects with a Custom Babel Plugin

This article explains how to use a custom Babel plugin to automatically inject standardized logging statements into JavaScript code, addressing common debugging challenges such as sparse logs, inconsistent log formats, and missing error handling in async/await constructs.

ASTBabelConsole Proxy
0 likes · 16 min read
Automating Log Insertion in Frontend Projects with a Custom Babel Plugin
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 22, 2022 · Frontend Development

Publishing a Web Components Dropdown as an npm Package with Babel and Webpack

This tutorial explains how to package a custom Web Components dropdown, publish it to npm using either Babel or Webpack, and then integrate the published component into a React application, covering project setup, configuration files, build scripts, and deployment steps.

BabelWeb ComponentsWebpack
0 likes · 11 min read
Publishing a Web Components Dropdown as an npm Package with Babel and Webpack
Qunar Tech Salon
Qunar Tech Salon
Nov 16, 2022 · Mobile Development

Cross‑Platform Rendering of Qunar Low‑Code Platform on React Native: Architecture, Code Transformation, and Runtime Integration

This article presents a technical case study of Qunar's low‑code platform, detailing the current cross‑platform rendering challenges, the feasibility analysis of replacing H5 with React Native, the design of a Babel‑based code transformer, runtime integration, performance results, and future plans.

BabelReact Nativecross‑platform
0 likes · 13 min read
Cross‑Platform Rendering of Qunar Low‑Code Platform on React Native: Architecture, Code Transformation, and Runtime Integration
vivo Internet Technology
vivo Internet Technology
Oct 26, 2022 · Frontend Development

Migrating WePY Mini‑Program to UniApp: Compiler Design and Implementation

The Vivo front‑end team built a custom compiler that automatically transforms WePY mini‑program files—including templates, scripts, components, and pages—into UniApp Vue code, cutting the estimated 25‑person‑day migration to seconds, delivering a bug‑free launch and paving the way for open‑sourcing the tool.

BabelCompilerJavaScript
0 likes · 32 min read
Migrating WePY Mini‑Program to UniApp: Compiler Design and Implementation
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 30, 2022 · Frontend Development

Enhanced ES‑Check Implementation with Multi‑File Detection, HTML Support, and SourceMap Parsing

This article examines existing ES‑check tools, compares community and mpx implementations, and presents a comprehensive enhanced version that supports multi‑file detection, HTML parsing, source‑map resolution, and both CLI and library usage, detailing its underlying principles, code examples, and practical advantages for frontend development.

BabelCompatibilityES6
0 likes · 20 min read
Enhanced ES‑Check Implementation with Multi‑File Detection, HTML Support, and SourceMap Parsing
ByteFE
ByteFE
Sep 19, 2022 · Frontend Development

Comprehensive Guide to Babel: History, Configuration, Plugins, Presets, Runtime and Webpack Integration

This article provides an in‑depth overview of Babel, covering its origins, core purpose as a JavaScript compiler, configuration file options, plugin and preset usage, runtime optimization, integration with webpack, and the underlying parsing‑transform‑generation pipeline illustrated with a simple compiler example.

BabelCompilerJavaScript
0 likes · 30 min read
Comprehensive Guide to Babel: History, Configuration, Plugins, Presets, Runtime and Webpack Integration
Tencent Cloud Developer
Tencent Cloud Developer
Aug 30, 2022 · Frontend Development

Comprehensive Guide to Webpack: Core Concepts, Configuration, Loaders, and Optimization

This comprehensive, step‑by‑step guide walks developers through Webpack’s core concepts, project setup, configuration files, development server with hot module replacement, essential loaders for CSS, images, Less, and Babel, plus optimization techniques such as JavaScript minification, CSS extraction, and output cleaning.

BabelDev ServerOptimization
0 likes · 15 min read
Comprehensive Guide to Webpack: Core Concepts, Configuration, Loaders, and Optimization