gajus / gajus/flow-runtime

browser build does not work out of the box for webpack

Open
#212 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
797
Forks
49
PR merge metrics
No merged PRs in 30d

Description

This isa:

- [X] Bug Report

Which concerns:

- [X] flow-runtime
- [X] The documentation website

---
I am not sure about rollup, but using flow-runtime in browser, compiled with webpack does not work out of the box. The user has to either:
- `import 'regenerator-runtime'` at the entrypoint
- webpack config `resolver.alias: { 'flow-runtime': 'flow-runtime/dist/flow-runtime.es2015.js' }`
otherwise the browser throws the following error.
```
Uncaught Error: Cannot find module 'regenerator-runtime'
at webpackMissingModule (webpack:///./node_modules/flow-runtime/dist/flow-runtime.umd.js?:13)
```
I have found the issue #29 which created a separate browser bundle, though it appears `regenerator-runtime` was originally part of that bundle. If this separation intentional, then perhaps the documentation should be updated to explain how to fix this. Otherwise, `regenerator-runtime` is not being added to the browser bundle like it should be.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.