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

Cannot use spread operator #55

Closed
syu93 opened this issue Mar 25, 2021 · 1 comment
Closed

Cannot use spread operator #55

syu93 opened this issue Mar 25, 2021 · 1 comment
Labels
wontfix This will not be worked on

Comments

@syu93
Copy link

syu93 commented Mar 25, 2021

Issue

Hi, I've been following your work on this project since the beginning and now I'm ready to give it a try.

I'm using greenlet inside my Vue 2 application and in one particular case I've the following error :

Uncaught (in promise) ReferenceError: [_PATH_]_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ is not defined

It's seems it miss a dependency to transpile the spread operator. I don't know if it is a Vue specific issue or something more global

Sep to reproduce

Inside a vue compoenent :

import greenlet from 'greenlet';

const fnSomeWorkerAction = greenlet((itemsToWorkWith) => {
  return itemsToWorkWith.map((item) => {
    return {
      ...item,
    };
  });
});

export default {
  data() {
    items: Array.from(Array(100)).map((item, idx) => ({ id: idx, name: `Plop ${idx}` }),
    fnSomeWorkerAction
  },
  mounted() {
    this.fnSomeWorkerAction(this.items);
  }
}
@developit
Copy link
Owner

This is a Vue issue. Don't transpile to helpers when using Greenlet, that isn't supported.

@developit developit added the wontfix This will not be worked on label Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants