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

new.target is treated as import.meta #4678

Closed
petamoriken opened this issue Oct 17, 2022 · 2 comments · Fixed by #4679
Closed

new.target is treated as import.meta #4678

petamoriken opened this issue Oct 17, 2022 · 2 comments · Fixed by #4679
Assignees

Comments

@petamoriken
Copy link

Rollup Version

v3

Operating System (or Browser)

Chrome 106

Node Version (if applicable)

No response

Link To Reproduction

https://rollupjs.org/repl/?version=3.2.2&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmV4cG9ydCUyMGNsYXNzJTIwRm9vJTIwJTdCJTVDbiUyMCUyMGNvbnN0cnVjdG9yKCklMjAlN0IlNUNuJTIwJTIwJTIwJTIwY29uc29sZS5sb2cobmV3LnRhcmdldCklM0IlNUNuJTIwJTIwJTdEJTVDbiU3RCUyMiUyQyUyMmlzRW50cnklMjIlM0F0cnVlJTdEJTVEJTJDJTIyb3B0aW9ucyUyMiUzQSU3QiUyMmZvcm1hdCUyMiUzQSUyMmFtZCUyMiUyQyUyMm5hbWUlMjIlM0ElMjJteUJ1bmRsZSUyMiUyQyUyMmFtZCUyMiUzQSU3QiUyMmlkJTIyJTNBJTIyJTIyJTdEJTJDJTIyZ2xvYmFscyUyMiUzQSU3QiU3RCU3RCUyQyUyMmV4YW1wbGUlMjIlM0FudWxsJTdE

Expected Behaviour

define(['exports'], (function (exports) { 'use strict';

  class Foo {
    constructor() {
      console.log(new.target);
    }
  }

  exports.Foo = Foo;

}));

Actual Behaviour

define(['exports'], (function (exports) { 'use strict';

  class Foo {
    constructor() {
      console.log(({ url: new URL(module.uri, document.baseURI).href }));
    }
  }

  exports.Foo = Foo;

}));
@lukastaegert
Copy link
Member

Oops, fix at #4679.

@rollup-bot
Copy link
Collaborator

This issue has been resolved via #4679 as part of rollup@3.2.3. You can test it via npm install rollup.

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

Successfully merging a pull request may close this issue.

3 participants