systemjs / plugin-babel

SystemJS Babel Plugin
MIT License
83 stars 33 forks source link

Propagate `babelOptions.moduleIds` downstream #69

Closed tsabirgaliev closed 7 years ago

tsabirgaliev commented 7 years ago

Modules loaded in-browser are not aware of their moduleIds. In particular, this is problematic for Angular 2 projects with relative component template paths.

Code like this throws 'module' not defined:

@Component({
  moduleId: module.id,
  selector: "my-component",
  templateUrl: "my-component.html"
})
export class MyComponent {
...
guybedford commented 7 years ago

Use __moduleName in Es modules in place of module.id which is for CommonJS modules only.

tsabirgaliev commented 7 years ago

Thank you!

Please disregard this PR, my conclusion was based on false positive test.