Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importing vue results in a "regeneratorRuntime is not defined" error #8724

Closed
codanator opened this issue Sep 18, 2018 · 4 comments · Fixed by #14538
Closed

importing vue results in a "regeneratorRuntime is not defined" error #8724

codanator opened this issue Sep 18, 2018 · 4 comments · Fixed by #14538
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@codanator
Copy link

Bug Report

Current Behavior
When importing vuejs in my project i getting following error in the browser: "regeneratorRuntime is not defined".

In the webpack debug ouput it will say:

Using polyfills with usage option:
Based on your code and targets, none were added.

Now i have to target an older browser (ie 11 or so) to get the regenerator-runtime included.
I am not sure if this is a bug... but i think i should work out of the box?

Babel Configuration (.babelrc, package.json, cli command)

{
	"presets": [
		[
			"@babel/preset-env",
			{

				"debug": true,
				"targets": {
					"chrome": "69",
					"firefox": "62",
					"edge": "17"
				},
				"useBuiltIns": "usage"
			}
		]
	]
}

Environment

  • Babel version(s): 7.1.0
  • Node/npm version: Node 8.11.4
  • OS: 10.13.6
  • How you are using Babel: loader
@babel-bot
Copy link
Collaborator

Hey @codanator! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@mrichmond
Copy link

mrichmond commented Oct 8, 2018

Not sure if this is related, but I seem to be having a similar issue... #8829

@ghost
Copy link

ghost commented Dec 11, 2018

Same issue and it is indeed the same as #8829

Definite bug, this should work out of the box for setting 'usage', works fine if you include the entire polyfil and do not use usage.

@n4an
Copy link

n4an commented Aug 27, 2020

I restored config, turn back to moment when I generated it with vue cli:

options: {
presets: ['@vue/app']
}

And install:
npm i @vue/babel-preset-app@^4.5.4

I think I changed it to "@babel/preset-env" and "env" when I use some pieces of code from examples from github.
With @vue/app work well!

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 19, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants