hiroppy / the-sample-of-module-bundler

You will know how to make a javascript bundler

Home Page:https://blog.hiroppy.me/entry/create-module-bundler-preparation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The sample of Module Bundler

Introducing how to create a module bundler.

Feature

You can see output codes here.

Implementation Contents Output Code
CJS (require/exports/module.exports) cjs/simple
circular dependency (CJS/ESM) cjs/circularDependency
node_modules with CJS cjs/node-modules
ESM esm/simple, esm/complication
import ImportDeclaration esm/import
default import/export (ImportDefaultSpecifier,ExportDefaultDeclaration) esm/default
specifier import/export(ImportSpecifier, ExportNamedDeclaration) esm/specifier
namespace specifier import (ImportNamespaceSpecifier) esm/namespaceSpecifier
node_modules with ESM esm/node-modules
interop between CJS and ESM common/interop

Development

$ npm i
$ npm test
$ cd tests/output # and you can see the output code

About

You will know how to make a javascript bundler

https://blog.hiroppy.me/entry/create-module-bundler-preparation


Languages

Language:JavaScript 100.0%Language:Makefile 0.0%