Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

regeneratorRuntime not defined in ^1.0.0 - (2.0.0 works) #169

Open
niieani opened this issue Jun 20, 2016 · 2 comments
Open

regeneratorRuntime not defined in ^1.0.0 - (2.0.0 works) #169

niieani opened this issue Jun 20, 2016 · 2 comments

Comments

@niieani
Copy link

niieani commented Jun 20, 2016

ERROR in ./~/awesome-typescript-loader/dist.babel/entry.js!./src/users.ts
Module build failed: ReferenceError: regeneratorRuntime is not defined
    at Object.loader (/aurelia/skeleton-navigation/skeleton
-webpack-typescript/node_modules/awesome-typescript-loader/dist.babel/index.js:56:44)

This shows up with the default installation of awesome-typescript-loader (not using babel or anything like that).
The error doesn't happen when using the the experimental 2.0.0-rc.3, but that one doesn't manage to resolve all the modules: #168 (comment)

@niieani
Copy link
Author

niieani commented Jun 20, 2016

As a workaround, I fixed the problem by adding:

require('regenerator-runtime/runtime')

to the top of my webpack.config.js file.

@charandas
Copy link

It isn't totally clear if @niieani meant to just do the require, because it doesn't resolve my issue.

I am using awesome-typescript-loader 3.1.3, and for me the resolution is to do the following:

# in webpack.config.js, add this to `config.plugins`
new ProvidePlugin({
  'regeneratorRuntime': 'regenerator-runtime/runtime'
}),

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants