Skip to content

Reflect-Metadata doesn't work with WebPack 3 Scope Hoisting #77

Open
@CmdrShepardsPie

Description

@CmdrShepardsPie

I tried reporting this to the WebPack team and they said it is a problem with Reflect-Metadata.

I'm using Reflect-Metadata in a TypeScript project that's being built and bundled with WebPack 3. When I add the scope hoisting plugin to my WebPack config, the project no longer runs properly.

I get the following error:
Uncaught TypeError: Reflect.hasOwnMetadata is not a function
at injectable.js:7
at Object.__decorate [as a] (tslib.es6.js:48)
at Object../client/app/app.bootstrap.ts (data.service.ts:4)
at webpack_require (bootstrap 1856459e76a82a034076:54)
at webpackJsonpCallback (bootstrap 1856459e76a82a034076:25)
at app.js:1
(anonymous) @ injectable.js:7
__decorate @ tslib.es6.js:48
./client/app/app.bootstrap.ts @ data.service.ts:4
webpack_require @ bootstrap 1856459e76a82a034076:54
webpackJsonpCallback @ bootstrap 1856459e76a82a034076:25
(anonymous) @ app.js:1

Is there a way to make it work, or can this problem be fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions