2018-02-16 14:37:17 +00:00
|
|
|
const path = require('path');
|
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
name: 'checkout',
|
|
|
|
stats: {
|
|
|
|
children: false,
|
|
|
|
moduleTrace: false,
|
|
|
|
modules: false
|
|
|
|
},
|
|
|
|
entry: {
|
2019-01-29 16:54:37 +00:00
|
|
|
app: ['./src/app/polyfills.ts', './src/app/index.tsx']
|
|
|
|
},
|
|
|
|
optimization: {
|
|
|
|
splitChunks: {
|
|
|
|
cacheGroups: {
|
|
|
|
commons: {
|
|
|
|
test: /[\\/]node_modules[\\/]/,
|
|
|
|
name: 'vendor',
|
|
|
|
chunks: 'all'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-02-16 14:37:17 +00:00
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
modules: ['node_modules', path.join(__dirname, 'src/app')],
|
|
|
|
extensions: ['.ts', '.tsx', '.js'],
|
|
|
|
alias: {
|
|
|
|
checkout: __dirname + '/../src/app'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: './src/app/index.html',
|
|
|
|
filename: 'checkout.html'
|
|
|
|
}),
|
|
|
|
new CopyWebpackPlugin(
|
|
|
|
[
|
2018-08-01 10:25:13 +00:00
|
|
|
{ from: './src/app/finish-interaction.html' },
|
|
|
|
{ from: './src/appConfig.json', to: '..' },
|
2018-12-20 08:56:59 +00:00
|
|
|
{ from: './src/locale/*.json', to: './locale', flatten: true }
|
2018-02-16 14:37:17 +00:00
|
|
|
],
|
2020-01-17 15:19:22 +00:00
|
|
|
{ logLevel: 'warn' }
|
2018-02-16 14:37:17 +00:00
|
|
|
)
|
|
|
|
]
|
|
|
|
};
|