test: /\.(sass|scss)$/,
use: [
'css-to-string-loader',
- 'css-loader?sourceMap',
+ {
+ loader: 'css-loader',
+ options: {
+ sourceMap: true,
+ importLoaders: 1
+ }
+ },
'resolve-url-loader',
{
loader: 'sass-loader',
helpers.root('src/index.html'),
helpers.root('src/standalone/videos/embed.html')
]
+ },
+
+ /* File loader for supporting images, for example, in CSS files.
+ */
+ {
+ test: /\.(jpg|png|gif)$/,
+ use: 'url-loader'
}
]
*
* See: https://www.npmjs.com/package/copy-webpack-plugin
*/
+
// Used by embed.html
new CopyWebpackPlugin([
{
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: [ /polyfill|vendor/, 'webtorrent.min.js' ],
+ sync: [ /polyfill|vendor/ ],
defaultAttribute: 'async',
preload: [/polyfill|vendor|main/],
prefetch: [/chunk/]