Tagged articles
5 articles
Page 1 of 1
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.

CJSESMJavaScript
0 likes · 20 min read
Comprehensive Guide to Packaging JavaScript Libraries: ESM, CJS, UMD and Best Practices
JD Tech
JD Tech
Mar 29, 2018 · Frontend Development

Building a Vue 2 Mobile UI Component Library: Scaffolding, Packaging, Component Types, and Icon Strategies

This article shares the practical experience of creating a Vue 2 mobile UI component library, covering the choice of scaffolding tools, Webpack UMD packaging configuration, component classification, CSS scoping decisions, on‑demand custom builds, and the adoption of SVG‑based icon solutions.

Component LibrarySVG IconsScoped CSS
0 likes · 12 min read
Building a Vue 2 Mobile UI Component Library: Scaffolding, Packaging, Component Types, and Icon Strategies
CSS Magic
CSS Magic
Feb 4, 2016 · Frontend Development

How to Build a JavaScript Library with Webpack and ES6

This tutorial explains how to define a JavaScript library, set up a clean project structure, use Babel to transpile ES6, configure Webpack for development and production builds (including UMD output), add npm scripts, run Mocha/Chai tests, and manage related configuration files.

babeles6javascript library
0 likes · 11 min read
How to Build a JavaScript Library with Webpack and ES6