Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

__moduleName is empty (undefined) #635

Closed
acostaf opened this issue Jun 27, 2016 · 10 comments
Closed

__moduleName is empty (undefined) #635

acostaf opened this issue Jun 27, 2016 · 10 comments

Comments

@acostaf
Copy link

acostaf commented Jun 27, 2016

HI Team

buildStatic js using systemjs set __moduleName as empty, I have already used encodeNames: false but nothing

@guybedford
Copy link
Member

Does it work when dynamically loading?

If so what transpiler configuration are you using?

@acostaf
Copy link
Author

acostaf commented Jun 27, 2016

Hi Guy

I am transpiling from Typescript (module:system) everything works file untill I bundling using systemjs.builder

@guybedford
Copy link
Member

__moduleName builds are only supported as of TypeScript 1.8, make sure you are using at least that version? Also __moduleName is only supported for ES modules.

@acostaf
Copy link
Author

acostaf commented Jun 28, 2016

Hi Guy

__moduleName works fine during development systemjs fill it with the right data the issue is when I package the javascript files with systemjs bulder, then the value is empty, as I said before I used encodeNames: false to prevent the name to by mangled up but not luck.

Any idea?

@guybedford
Copy link
Member

As mentioned, this is determined by the system you use to build your JS, even if it did work in the browser. I'd suggest checking your transpilation options and confirming that it is a system module format output on TypeScript 1.8 or greater.

@Jefftopia
Copy link

@acostaf @guybedford Same issue. I'm using typescript 1.8.10. I had to revert transpilation to commonjs and module.id until the issue is resolved.

@asapach
Copy link
Member

asapach commented Jul 20, 2016

Do you guys have a repro case? Builder should handle __moduleName when you use System.register() format.

@frederikschubert
Copy link

This should fix it.

@guybedford
Copy link
Member

Yes this was a bug in SFX... fix coming in this release.

@guybedford
Copy link
Member

Released in 0.15.24.

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

No branches or pull requests

5 participants