Skip to content

Instantly share code, notes, and snippets.

View RavenXce's full-sized avatar
🎯
Focusing

Ivan Poon RavenXce

🎯
Focusing
View GitHub Profile
@RavenXce
RavenXce / I18nRuntimePlugin.js
Created April 12, 2016 11:23 — forked from valscion/I18nRuntimePlugin.js
Venuu I18n Webpack integration
var ConstDependency = require('webpack/lib/dependencies/ConstDependency');
var NullFactory = require('webpack/lib/NullFactory');
var _ = require('lodash');
function I18nRuntimePlugin(options) {
options = options || {};
this.functionNames = options.functionNames || ['I18n.t', 'I18n.translate'];
this.translationsPlaceholder = options.translationsPlaceholder || 'I18N_RUNTIME_TRANSLATIONS';
this.fullTranslations = options.fullTranslations || {};
}