-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.extract-i18n.config.js
39 lines (33 loc) · 1.01 KB
/
webpack.extract-i18n.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const path = require('path');
const merge = require('webpack-merge');
const {AngularCompilerPlugin} = require('@ngtools/webpack');
const config = require('./webpack.config.js');
module.exports = merge(config, {
mode: 'production',
output: {
path: path.resolve(__dirname, 'prod'),
publicPath: '/',
filename: '[name].[chunkhash].js',
},
module: {
rules: [
{
test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
use: '@ngtools/webpack',
},
],
},
optimization: {
noEmitOnErrors: true,
},
plugins: [
new AngularCompilerPlugin({
tsConfigPath: path.resolve(__dirname, 'tsconfig.json'),
entryModule: path.resolve(__dirname, 'src/app/app.module#AppModule'),
i18nOutFile: path.resolve(__dirname, 'i18n/messages.en.xlf'),
i18nOutFormat: 'xlf',
locale: 'en',
platform: 0,
}),
],
});