Tag

ESM

0 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 9, 2024 · Fundamentals

A Comprehensive Overview of JavaScript Module Systems: From Traditional Scripts to ESM

This article traces the evolution of JavaScript module systems—from the early script tags and manual dependency ordering, through CommonJS, AMD, and UMD, to the modern ECMAScript modules—explaining their origins, challenges, and how bundlers and package fields enable seamless usage across browsers and Node.js environments.

AMDBundlersCommonJS
0 likes · 13 min read
A Comprehensive Overview of JavaScript Module Systems: From Traditional Scripts to ESM
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 2, 2024 · Frontend Development

Understanding Vite’s Development Server, Plugin System, and Pre‑Bundling Mechanism

This article explains how Vite speeds up frontend development by serving unbundled ES modules, using a plugin‑based transform pipeline, performing on‑the‑fly compilation, pre‑bundling dependencies with esbuild, and finally leveraging Rollup for production builds while maintaining consistent behavior across dev and prod environments.

Build ToolsESMHot Module Replacement
0 likes · 9 min read
Understanding Vite’s Development Server, Plugin System, and Pre‑Bundling Mechanism
Sohu Tech Products
Sohu Tech Products
Mar 29, 2023 · Backend Development

Comprehensive Guide to Packaging JavaScript Libraries: ESM, CJS, UMD and Best Practices

This guide provides clear, practical recommendations for packaging JavaScript libraries—including outputting ESM, CJS and UMD formats, handling multi‑file builds, code compression, sourcemaps, TypeScript typings, external frameworks, modern browser support, and essential package.json fields—so developers can create robust, tree‑shakable, and well‑documented npm packages.

BundlersCJSESM
0 likes · 20 min read
Comprehensive Guide to Packaging JavaScript Libraries: ESM, CJS, UMD and Best Practices
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 28, 2022 · Frontend Development

Understanding Vite’s Core Design and Implementation: Server Startup, Pre‑bundling, and HMR

This article explores Vite’s evolution and core architecture, detailing how it improves development server startup time, performs dependency pre‑bundling with esbuild, creates the dev server, handles HTML injection, and implements fast hot‑module replacement through WebSocket communication.

Build ToolsESMHot Module Replacement
0 likes · 12 min read
Understanding Vite’s Core Design and Implementation: Server Startup, Pre‑bundling, and HMR
政采云技术
政采云技术
Aug 2, 2022 · Frontend Development

A Brief Discussion on Remote Component Loading Solutions for Low‑Code Platforms

This article examines low‑code development platforms and presents three remote component loading strategies—global‑object, AMD (require.js), and ESModule—detailing their packaging, CDN deployment, loading logic, advantages, drawbacks, and a final recommendation for ESModule‑based loading in modern front‑end development.

AMDESMVue
0 likes · 18 min read
A Brief Discussion on Remote Component Loading Solutions for Low‑Code Platforms
DaTaobao Tech
DaTaobao Tech
Aug 1, 2022 · Backend Development

Configuring Dynamic Entry Points for Node Packages: main, type, exports, and module fields

Library authors can configure package.json using main, type, exports, and module fields to provide separate CommonJS and ES module entry points, enabling runtime selection based on import or require, improving tree‑shaking, bundler compatibility, and TypeScript type resolution while restricting undefined sub‑paths.

CommonJSESMExports
0 likes · 11 min read
Configuring Dynamic Entry Points for Node Packages: main, type, exports, and module fields
ByteDance ADFE Team
ByteDance ADFE Team
Feb 14, 2022 · Frontend Development

Vite Introduction: Features, Core Principles, and Plugin System

This article provides a comprehensive overview of Vite, covering its definition, advantages over traditional bundlers like Webpack and Snowpack, the underlying ESM‑based development server, hot‑module replacement mechanisms, esbuild pre‑bundling, Rollup integration, plugin architecture, and a balanced summary of its strengths and limitations.

ESMHMRbuild tool
0 likes · 19 min read
Vite Introduction: Features, Core Principles, and Plugin System
ByteFE
ByteFE
Aug 31, 2021 · Frontend Development

Understanding Tree Shaking in Webpack: Theory, Implementation, and Best Practices

This article explains the concept of Tree Shaking as a dead‑code elimination technique based on ES Modules, details how to enable it in Webpack, describes the underlying implementation steps, and provides practical tips for writing tree‑shakable code while avoiding common pitfalls.

Dead Code EliminationESMWebpack
0 likes · 14 min read
Understanding Tree Shaking in Webpack: Theory, Implementation, and Best Practices
ByteDance Web Infra
ByteDance Web Infra
Aug 27, 2021 · Frontend Development

ESM Package Distribution and Next‑Generation Unbundled Development Tools

This article explains how ESM package distribution services convert npm packages to ESModule format, why such distribution is needed for modern browsers, the technical challenges involved, proposed solutions, and how these services can be combined with next‑generation unbundled development tools like Vite and Snowpack to dramatically speed up dependency installation and development server startup.

CDNESMJavaScript
0 likes · 14 min read
ESM Package Distribution and Next‑Generation Unbundled Development Tools
ByteDance Dali Intelligent Technology Team
ByteDance Dali Intelligent Technology Team
Jun 11, 2021 · Backend Development

Node.js Package Module Import/Export Rules and Conditional Exports – A Comprehensive Guide

This article explains the latest Node.js package module specifications, covering how the "type", "exports", and "imports" fields in package.json determine ESM or CommonJS loading, the history of version changes, subpath mappings, conditional exports, and best practices for dual-module packages.

CommonJSESMExports
0 likes · 27 min read
Node.js Package Module Import/Export Rules and Conditional Exports – A Comprehensive Guide
ByteFE
ByteFE
Jun 2, 2021 · Frontend Development

Exploring Unbundled Development: From Webpack Bottlenecks to Vite‑Based Dev Server Solutions

This article examines the performance challenges of traditional bundled development with Webpack, evaluates emerging unbundled tools such as Snowpack, WMR, and Vite, and details the design and implementation of a custom unbundled dev server that accelerates startup, handles dependency preprocessing, resource transformation, and hot module replacement.

Dev ServerESMWebpack
0 likes · 22 min read
Exploring Unbundled Development: From Webpack Bottlenecks to Vite‑Based Dev Server Solutions
ByteDance Web Infra
ByteDance Web Infra
May 22, 2021 · Frontend Development

Understanding Vite: ESM‑Based Dev Server, HMR, Pre‑Bundling, and Rollup Integration

This article explains how Vite improves development experience over traditional bundlers by leveraging native ESM support for a fast dev server, efficient hot‑module replacement, pre‑bundling of Node modules, and seamless integration with Rollup plugins for production builds and SSR.

Dev ServerESMHMR
0 likes · 12 min read
Understanding Vite: ESM‑Based Dev Server, HMR, Pre‑Bundling, and Rollup Integration