An open API service indexing awesome lists of open source software.

https://github.com/ulivz/minimal-esnext-module

A minimal esnext module used to test bundler behaviors
https://github.com/ulivz/minimal-esnext-module

Last synced: 7 months ago
JSON representation

A minimal esnext module used to test bundler behaviors

Awesome Lists containing this project

README

          

minimal-esnext-module


A minimal esnext module used to test bundler behaviors.


NPM version
NPM downloads
Build Status

## Motivation

Some meta frameworks doesn't transpile `node_modules` by default, and it's very common to troubleshot issues caused by esnext syntax located at `node_modules`. This module created some minimal functions for you to test bundler behaviors.

## Quick Start

```bash
npm i minimal-esnext-module
```

## API

### `async`

```ts
import { asyncFunc } from 'minimal-esnext-module';

asyncFunc();
```

### `Top-level await`

```ts
import { TOP_LEVEL_AWAIT } from 'minimal-esnext-module/top-level-await';

console.log(TOP_LEVEL_AWAIT);
```

## Contribution Guide

```bash
npm run bootstrap # install dependencies
npm run clean # clean dependencies
npm run dev # development both cjs and esm output
npm run build # build both cjs and esm
npm run lint # lint code
npm run lint:fix # fix all code lint errors
npm run test # run all tests
npm run cov # run all tests and generate coverage report
npm run release # release this package
```

## License

MIT © [ULIVZ](https://github.com/ulivz)