gettext-html-plugin
v1.2.0
Published
Gettext html webpack plugin
Downloads
2
Readme
Gettext Html Plugin
Install
npm install gettext-html-plugin --save-dev
Useage
webpack.config.js
const HtmlWebpackPlugin = require('html-webpack-plugin')
const GettextHtmlPlugin = require('gettext-html-plugin')
module.exports = {
entry: {
index: 'index.js'
},
output: {
path: __dirname + '/dist',
filename: 'index.js'
},
plugins: [
new HtmlWebpackPlugin({
filename: 'index.html',
template: __dirname + '/index.html',
chunks: ['index']
}),
new HtmlWebpackPlugin({
filename: 'zh-cn.html',
template: __dirname + '/index.html',
chunks: ['index']
}),
new GettextHtmlPlugin({
langsPath: __dirname + '/langs',
sources: {
'zh-cn.html': 'zh_CN'
}
})
]
}