*/
extensions: [ '.ts', '.js', '.json', '.scss' ],
- modules: [ helpers.root('src'), helpers.root('node_modules') ],
+ modules: [ helpers.root('src'), 'node_modules' ],
alias: {
'video.js$': path.resolve('node_modules/video.js/core.js'),
: '[name].[hash].bundle.js',
sourceMapFilename: '[file].map',
- chunkFilename: '[id].[hash].chunk.js',
+
+ chunkFilename: process.env.ANALYZE_BUNDLE === 'true'
+ ? '[name].chunk.js'
+ : '[id].[hash].chunk.js',
+
publicPath: '/client/standalone/videos/'
},
title: 'PeerTube',
chunksSortMode: 'auto',
inject: 'body',
- chunks: ['video-embed']
+ chunks: ['video-embed'],
+ minify: {
+ collapseWhitespace: true,
+ removeComments: false,
+ removeRedundantAttributes: true,
+ removeScriptTypeAttributes: true,
+ removeStyleLinkTypeAttributes: true,
+ useShortDoctype: true
+ }
}),
new HtmlWebpackPlugin({