A simple module bundler implemented with javascript and babel
A simple module bundler implemented with javascript and babel.
In this repo, we implement a very simple module bundler, whose functionality is similar to webpack. Several NPM modules are very important in the whole building process.
transformFromAst
method coming from babel-core, currently known as @babel/core, is used to transforms AST tree structure to es5 code.Finally, we need to put the generated code into a module wrapper. A simple wrapper looks like the code here.