I am trying to bundle a file that contains multiple export * as
lines for use in browser and Node.js.
src
are files to bundle.src/mod.ts
isrootName
, this file contains 2export * as
lines.
build.ts
is build script to createbundle.js
.bundle.js
is product ofbuild.ts
.test.js
tests exported values frombundle.js
.Makefile
contains bundle command and test command.
- Clone this repo
- Run
make test
All tests passed. All export * as
are converted to objects.
All tests failed. All export * as
are replaced by undefined
.