1.2.0 • Published 5 years ago

gettext-html-plugin v1.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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'
      }
    })
  ]
}
1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago