How to use the @ngtools/webpack.ExtractI18nPlugin function in @ngtools/webpack

To help you get started, we’ve selected a few @ngtools/webpack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fossasia / susper.com / node_modules / @angular / cli / models / webpack-configs / xi18n.js View on Github external
exports.getWebpackExtractI18nConfig = function (projectRoot, appConfig, genDir, i18nFormat, locale, outFile) {
    let exclude = [];
    if (appConfig.test) {
        exclude.push(path.join(projectRoot, appConfig.root, appConfig.test));
    }
    return {
        plugins: [
            new webpack_1.ExtractI18nPlugin({
                tsConfigPath: path.resolve(projectRoot, appConfig.root, appConfig.tsconfig),
                exclude: exclude,
                genDir: genDir,
                i18nFormat: i18nFormat,
                locale: locale,
                outFile: outFile,
            })
        ]
    };
};
//# sourceMappingURL=/users/hansl/sources/hansl/angular-cli/models/webpack-configs/xi18n.js.map