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

nunjucks-loader is having issues with addGlobal with Babel 6 #22

Closed
dschissler opened this issue Jan 9, 2016 · 3 comments
Closed

nunjucks-loader is having issues with addGlobal with Babel 6 #22

dschissler opened this issue Jan 9, 2016 · 3 comments
Labels

Comments

@dschissler
Copy link

babel/babel-loader#166 (comment)

I've had to disable my translation calls in the templates until I can figure this out. Also bluebird polyfill can't be found.

'use strict';
// let locale = require('locale');
let locale = require.resolve('locale');

module.exports = function(env) {
  env.addGlobal('gettext', function(message) {
    return locale.gettext(message);
  });
  env.addGlobal('t', function(message) {
    return locale.gettext(message);
  });
  env.addGlobal('ngettext', function(msg1, msg2, n) {
    return locale.ngettext(msg1, msg2, n);
  });
  env.addGlobal('n', function(msg1, msg2, n) {
    return locale.ngettext(msg1, msg2, n);
  });
};
@at0g at0g added the invalid label Jan 9, 2016
@at0g
Copy link
Owner

at0g commented Jan 9, 2016

I'd appreciate if you stop creating issues that have nothing to do with this project.
nunjucks-loader does not even use babel.

@at0g at0g closed this as completed Jan 9, 2016
@dschissler
Copy link
Author

@at0g I'm not putting blame on this project but I'm surprised that you think that it is unreasonable to create a dialog about issues that numerous people will have when using this project. Increasingly few people are writing in pure native Javascript these days as they are using Typescript, Babel, Coffeescript, etc. That is how the real world is working today. At least now when people do a search they will see that this is an issue an can decide for themselves if they want to spend a lot of time trying to resolve it themselves or to let other people figure it out.

@at0g
Copy link
Owner

at0g commented Jan 9, 2016

Personally I would be inclined to create the issue where I believe the problem exists (or can be fixed).

If you believe the issue can be fixed by changes to the code in this repository, I welcome the pull request.

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

No branches or pull requests

2 participants