1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const path = require("path");
|
4 | const config_1 = require("./config");
|
5 | const webpack_config_1 = require("./webpack-config");
|
6 | const webpackMerge = require('webpack-merge');
|
7 | const webpack_configs_1 = require("./webpack-configs");
|
8 | class 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 | }
|
27 | exports.XI18nWebpackConfig = XI18nWebpackConfig;
|
28 |
|
\ | No newline at end of file |