Skip to content

Opetushallitus/webpack-static-i18n-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-static-i18n-html

A webpack plugin for generating internationalized HTML files.
Inspired by gulp-static-i18n-html which offers the same functionality for gulp.

Installation

$ npm install --save-dev git+ssh://git@github.com/Opetushallitus/webpack-static-i18n-html.git

Usage

webpack.config.js

{
    entry: 'index.js',
    output: {
        path: __dirname + '/dist',
        filename: 'bundle.js'
    },
    plugins: [
        new StaticI18nHtmlPlugin({
            locale: 'fi',
            locales: ['fi', 'sv', 'en'],
            baseDir: __dirname,
            outputDir: join(__dirname, 'html/'),
            outputDefault: '__lng__/__file__',
            localesPath: join(__dirname, 'locales/'),
            files: 'templates/*.html'
        })
    ]
}

See node-static-i18n documentation for more information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published