X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fwebpack%2Fwebpack.video-embed.js;h=979da0dffee0c3f4a90b417d86b6862dc0249947;hb=18dbb5b9723040e19fea1ed6b0c4f2738508ffc8;hp=5a4e35deac3e1ce5e9599b7e396e9dc7cce07dc9;hpb=f6a7c82ca51896a433bc2264c52afd6981c7c4c6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js index 5a4e35dea..979da0dff 100644 --- a/client/webpack/webpack.video-embed.js +++ b/client/webpack/webpack.video-embed.js @@ -1,4 +1,5 @@ const helpers = require('./helpers') +const path = require('path') const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin const HtmlWebpackPlugin = require('html-webpack-plugin') @@ -13,7 +14,9 @@ module.exports = function () { const configuration = { entry: { - 'video-embed': './src/standalone/videos/embed.ts' + 'video-embed': './src/standalone/videos/embed.ts', + 'player': './src/standalone/player/player.ts', + 'test-embed': './src/standalone/videos/test-embed.ts' }, resolve: { @@ -24,7 +27,11 @@ module.exports = function () { */ extensions: [ '.ts', '.js', '.json', '.scss' ], - modules: [ helpers.root('src'), helpers.root('node_modules') ] + modules: [ helpers.root('src'), helpers.root('node_modules') ], + + alias: { + 'video.js$': path.resolve('node_modules/video.js/dist/alt/video.core.js') + } }, output: { @@ -84,7 +91,8 @@ module.exports = function () { use: 'raw-loader', exclude: [ helpers.root('src/index.html'), - helpers.root('src/standalone/videos/embed.html') + helpers.root('src/standalone/videos/embed.html'), + helpers.root('src/standalone/videos/test-embed.html') ] }, @@ -105,7 +113,10 @@ module.exports = function () { }), new PurifyCSSPlugin({ - paths: [ helpers.root('src/standalone/videos/embed.ts') ], + paths: [ + helpers.root('src/standalone/videos/embed.ts'), + helpers.root('src/standalone/videos/test-embed.html') + ], purifyOptions: { minify: true, whitelist: [ '*vjs*', '*video-js*' ] @@ -119,7 +130,17 @@ module.exports = function () { filename: 'embed.html', title: 'PeerTube', chunksSortMode: 'dependency', - inject: 'body' + inject: 'body', + chunks: ['video-embed'] + }), + + new HtmlWebpackPlugin({ + template: '!!html-loader!src/standalone/videos/test-embed.html', + filename: 'test-embed.html', + title: 'PeerTube', + chunksSortMode: 'dependency', + inject: 'body', + chunks: ['test-embed'] }), /**