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

breaks webpack: 'return' outside of function #12

Closed
zaggino opened this issue Dec 17, 2019 · 3 comments
Closed

breaks webpack: 'return' outside of function #12

zaggino opened this issue Dec 17, 2019 · 3 comments

Comments

@zaggino
Copy link

zaggino commented Dec 17, 2019

This package depends on "promise.allsettled": "^1.0.0",

works when forced to 1.0.1, but when resolved to 1.0.2 breaks webpack builds with:

Creating an optimized production build...
Failed to compile.

./node_modules/is-map/index.js
SyntaxError: /usr/app/node_modules/is-map/index.js: 'return' outside of function (12:1)

  10 | \t\treturn false;
  11 | \t};
> 12 | \treturn;
     | \t^
  13 | }
  14 | 
  15 | var $mapHas = $Map ? Map.prototype.has : null;
@lencioni
Copy link
Contributor

lencioni commented Dec 17, 2019

This seems to be a problem with the promise.allsettled package. It looks like you already opened an issue over there: es-shims/Promise.allSettled#7

cc @ljharb

@ljharb
Copy link
Contributor

ljharb commented Dec 17, 2019

Top level return has always been valid in node modules; this seems to be a problem with a webpack configuration.

@ljharb
Copy link
Contributor

ljharb commented Dec 17, 2019

v2.0.1 of both is-map and is-set have been released.

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

No branches or pull requests

3 participants