UNPKG

1.31 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const path = require("path");
4const config_1 = require("./config");
5const webpack_config_1 = require("./webpack-config");
6const webpackMerge = require('webpack-merge');
7const webpack_configs_1 = require("./webpack-configs");
8class XI18nWebpackConfig extends webpack_config_1.NgCliWebpackConfig {
9 constructor(extractOptions, appConfig) {
10 super({
11 target: 'development',
12 verbose: extractOptions.verbose,
13 progress: extractOptions.progress
14 }, appConfig);
15 this.extractOptions = extractOptions;
16 this.appConfig = appConfig;
17 super.buildConfig();
18 }
19 buildConfig() {
20 const configPath = config_1.CliConfig.configFilePath();
21 const projectRoot = path.dirname(configPath);
22 const extractI18nConfig = webpack_configs_1.getWebpackExtractI18nConfig(projectRoot, this.appConfig, this.extractOptions.genDir, this.extractOptions.i18nFormat, this.extractOptions.locale, this.extractOptions.outFile);
23 this.config = webpackMerge([this.config, extractI18nConfig]);
24 return this.config;
25 }
26}
27exports.XI18nWebpackConfig = XI18nWebpackConfig;
28//# sourceMappingURL=/users/hansl/sources/angular-cli/models/webpack-xi18n-config.js.map
\No newline at end of file