X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fwebpack%2Fwebpack.video-embed.js;h=4c7f7e19cab8e81bce36328da17eb941298da94f;hb=87244e54bbb7e455a394c69386fb5021237627ac;hp=2ecbd09afc1300c2417d3306dec8e5587f83aca8;hpb=1d4591fd9c724c9409da31612f6d8c008f1cb5e4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js index 2ecbd09af..4c7f7e19c 100644 --- a/client/webpack/webpack.video-embed.js +++ b/client/webpack/webpack.video-embed.js @@ -3,7 +3,6 @@ const path = require('path') const HtmlWebpackPlugin = require('html-webpack-plugin') const TerserPlugin = require('terser-webpack-plugin') -const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin') const ProvidePlugin = require('webpack/lib/ProvidePlugin') const MiniCssExtractPlugin = require('mini-css-extract-plugin') @@ -105,21 +104,23 @@ module.exports = function () { { test: /\.html$/, - use: 'raw-loader', exclude: [ helpers.root('src/index.html'), helpers.root('src/standalone/videos/embed.html'), helpers.root('src/standalone/videos/test-embed.html') - ] + ], + type: 'asset/source' }, { - test: /\.(jpg|png|gif)$/, - use: 'url-loader' + test: /\.(jpg|png|gif|svg)$/, + type: 'asset' }, - { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'url-loader?limit=10000&minetype=application/font-woff' }, - { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'file-loader' } + { + test: /\.(ttf|eot|woff2?)$/, + type: 'asset' + } ] }, @@ -160,20 +161,6 @@ module.exports = function () { chunksSortMode: 'auto', inject: 'body', chunks: [ 'test-embed' ] - }), - - /** - * Plugin LoaderOptionsPlugin (experimental) - * - * See: https://gist.github.com/sokra/27b24881210b56bbaff7 - */ - new LoaderOptionsPlugin({ - options: { - context: __dirname, - output: { - path: helpers.root('dist') - } - } }) ],