*/
extensions: [ '.ts', '.js', '.json', '.scss' ],
- modules: [helpers.root('src'), 'node_modules']
+ modules: [helpers.root('src'), 'node_modules'],
+
+ alias: {
+ 'video.js': 'video.js/dist/alt/video.novtt'
+ }
},
/*
{
test: /\.html$/,
loader: 'raw-loader',
- exclude: [ helpers.root('src/index.html') ]
+ exclude: [ helpers.root('src/index.html'), helpers.root('src/standalone/videos/embed.html') ]
}
]
*
* See: https://www.npmjs.com/package/copy-webpack-plugin
*/
+ // Used by embed.html
new CopyWebpackPlugin([
{
from: 'src/assets',
{
from: 'node_modules/webtorrent/webtorrent.min.js',
to: 'assets/webtorrent'
+ },
+ {
+ from: 'node_modules/video.js/dist/video.min.js',
+ to: 'assets/video-js'
+ },
+ {
+ from: 'node_modules/video.js/dist/video-js.min.css',
+ to: 'assets/video-js'
+ },
+ {
+ from: 'node_modules/videojs-dock/dist/videojs-dock.min.js',
+ to: 'assets/video-js'
+ },
+ {
+ from: 'node_modules/videojs-dock/dist/videojs-dock.css',
+ to: 'assets/video-js'
+ },
+ {
+ from: 'src/standalone',
+ to: 'standalone'
}
]),
* See: https://github.com/numical/script-ext-html-webpack-plugin
*/
new ScriptExtHtmlWebpackPlugin({
+ sync: [ 'webtorrent.min.js' ],
defaultAttribute: 'defer'
}),