nativescript-dev-webpack icon indicating copy to clipboard operation
nativescript-dev-webpack copied to clipboard

Publish a `__extends` scrubbing loader

Open hdeshev opened this issue 9 years ago • 3 comments

Originally reported in #8. Not passing the noEmitHelpers TypeScript compiler option generates multiple __extends functions which supersede the "runtime" __extends implementation when bundled.

Ideally third party plugins should compile with noEmitHelpers enabled, but the reality is that many of them don't do so. @NathanaelA has created a webpack loader that strips the module-local __extends code, so that apps work without modifying third party plugins. If given permission, we should publish and document this loader.

hdeshev avatar Jul 28 '16 15:07 hdeshev

@hdeshev feel free to steal the code and use it; having it an integrated whole is a much better solution than trying to get people to manually install it. :-)

NathanaelA avatar Jul 28 '16 16:07 NathanaelA

@hdeshev No crashing with 2.5 and @latest plugin, was this patched in somehow?

ghost avatar Feb 08 '17 10:02 ghost

just encountered the crash for an iOS build so I believe it's still in.

In my case it was not 3rd party plugin code that caused this but some code with platform specific implementations in the main ./app folder (i.e. something.ios.ts).

Specifically, the implementation was extending UIView and thus the __extends got emitted.

lambourn avatar Mar 08 '18 12:03 lambourn