dvlsg / async-csp

CSP style channels using ES7 async/await
MIT License
317 stars 18 forks source link

Added polyfill to webpack build #15

Closed XVincentX closed 8 years ago

XVincentX commented 8 years ago

I just realised that you're externalising regenerators. Those must be included in the browser build. This PR will fix this.

dvlsg commented 8 years ago

I don't believe this is necessary. Webpack should automatically inline any external dependencies (which is both a blessing and a curse).

I refactored the build stages into specific cjs / umd pipes, and included minified / uncompressed files where relevant. Can you grab the latest source from git, build, then take a look at ./examples/browser/index.html? You should be able to just load that index.html from your filesystem and see the async-csp output running in your console, provided your environment is relatively new (chrome, has access to Promises, etc). If you are unable to run that, let me know what browser version you are using and post the errors.

XVincentX commented 8 years ago

That's true, but your babelrc file has a plugin which is avoiding regenerator incorporation Have a look here: http://s.codepen.io/XVincentX/debug/VayNMr

image

dvlsg commented 8 years ago

Looks included to me. The error on your codepen is from the transpiled ping pong piece, not the source file itself.

async-csp-browser-console

async-csp-browser-index

XVincentX commented 8 years ago

Whoops, you're right.