webpack-angular-gettext
Webpack plugin & loader that extract translatable strings from your source files for angular-gettext.
Based on webpack-angular-translate and angular-gettext-extract-loader.
Getting started
Install the plugin using npm:
npm install --save-dev webpack-angular-gettext
Configure the loader and the plugin in the webpack configuration.
var WebpackAngularGettext = require('webpack-angular-gettext');
module.exports = {
// ...
module: {
preLoaders: [
{
test: /\.html$/,
exclude: /node_modules/,
loader: WebpackAngularGettext.loader()
},
{
test: /\.js$/,
loader: WebpackAngularGettext.loader()
}
]
}
plugins: [
new WebpackAngularGettext.Plugin()
]
};
The Plugin()
accepts the following options in the constructor:
- fileName: The name of the file that contains all the translations, default
translations.pot