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

Not working with Webpack #27

Closed
mcgilly17 opened this issue Jan 23, 2017 · 4 comments
Closed

Not working with Webpack #27

mcgilly17 opened this issue Jan 23, 2017 · 4 comments

Comments

@mcgilly17
Copy link
Contributor

I tried using this with Webpack (using require and import) however i couldn't get it to work.

By making the following change:

return angular.module('ngMeta', [])

It worked in webpack.

@mcgilly17
Copy link
Contributor Author

@vinaygopinath can you check this please? we are hoping to use this in prod asap.

Thanks

McGilly

@Nargonath
Copy link

Nargonath commented Jul 17, 2017

It would require a simple modification in the ngMeta.js. Just need to return the angular.module name at the end of the file. I can make the PR if needed.

@christiaanwesterbeek
Copy link

christiaanwesterbeek commented Sep 19, 2017

The change in PR #28 seems inconsistent with the way I'm used to exporting a module. I think we should return the name property. Not sure about the rest of you.

return angular.module('ngMeta', [])
  .provider('ngMeta', function() {
    ...
  })
  .name // <-- return the name

Without returning the name, I need to

import angular from 'angular'
import 'ng-meta'

export const AppModule = angular
  .module('app', [
    'ngMeta'
  ])
  .name

And I would like to:

import angular from 'angular'
import ngMeta from 'ng-meta'

export const AppModule = angular
  .module('app', [
    ngMeta
  ])
  .name

@vinaygopinath
Copy link
Owner

@devotis Thanks for the suggestion. I'm open for the module to return the name as long as it has no impact on the way the module is imported in other build systems. Would you be willing to test it out with webpack, and, say, gulp and make a new PR?

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

No branches or pull requests

4 participants