X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fwebpack%2Fwebpack.video-embed.js;h=b6a1c4c050f918f4d8db03f57445c1e1ac821ea1;hb=4504f09f6e85f09b0489debb547a17209d7176ea;hp=f6d532556c70b6a86b6fc557576ca65b203343f6;hpb=2ad9dcda240ee843c5e4a5b98cc94f7b2aab2c89;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js index f6d532556..b6a1c4c05 100644 --- a/client/webpack/webpack.video-embed.js +++ b/client/webpack/webpack.video-embed.js @@ -27,15 +27,21 @@ module.exports = function () { modules: [ helpers.root('src'), helpers.root('node_modules') ], alias: { - 'video.js$': path.resolve('node_modules/video.js/dist/alt/video.core.novtt.js') + 'video.js$': path.resolve('node_modules/video.js/core.js'), + '@root-helpers': path.resolve('src/root-helpers'), + '@shared': path.resolve('../shared') } }, output: { path: helpers.root('dist/standalone/videos'), - filename: '[name].[hash].bundle.js', + + filename: process.env.ANALYZE_BUNDLE === 'true' + ? '[name].bundle.js' + : '[name].[hash].bundle.js', + sourceMapFilename: '[file].map', - chunkFilename: '[id].chunk.js', + chunkFilename: '[id].[hash].chunk.js', publicPath: '/client/standalone/videos/' }, @@ -78,10 +84,12 @@ module.exports = function () { { loader: 'sass-loader', options: { - sourceMap: true, - includePaths: [ - helpers.root('src/sass/include') - ] + sassOptions: { + sourceMap: true, + includePaths: [ + helpers.root('src/sass/include') + ] + } } } ] @@ -111,7 +119,9 @@ module.exports = function () { plugins: [ new ExtractTextPlugin({ - filename: '[name].[hash].css' + filename: process.env.ANALYZE_BUNDLE === 'true' + ? '[name].css' + : '[name].[hash].css' }), new PurifyCSSPlugin({ @@ -131,7 +141,7 @@ module.exports = function () { template: 'src/standalone/videos/embed.html', filename: 'embed.html', title: 'PeerTube', - chunksSortMode: 'dependency', + chunksSortMode: 'auto', inject: 'body', chunks: ['video-embed'] }), @@ -140,7 +150,7 @@ module.exports = function () { template: '!!html-loader!src/standalone/videos/test-embed.html', filename: 'test-embed.html', title: 'PeerTube', - chunksSortMode: 'dependency', + chunksSortMode: 'auto', inject: 'body', chunks: ['test-embed'] }),