X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fwebpack%2Fwebpack.video-embed.js;h=70141527c18190efa8866e9c64e8ac86fb1571b2;hb=4ec25ae825f8dee44d948b38d8216f9a239ff7b3;hp=aa7c5e550081860396d33a61843e40a606b09752;hpb=bd45d503e5d007e730f4e81dccd7e7864c9a85cc;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js index aa7c5e550..70141527c 100644 --- a/client/webpack/webpack.video-embed.js +++ b/client/webpack/webpack.video-embed.js @@ -4,8 +4,7 @@ const path = require('path') const HtmlWebpackPlugin = require('html-webpack-plugin') const TerserPlugin = require('terser-webpack-plugin') const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin') -const ExtractTextPlugin = require('extract-text-webpack-plugin') -const PurifyCSSPlugin = require('purifycss-webpack') +const MiniCssExtractPlugin = require('mini-css-extract-plugin') module.exports = function () { const configuration = { @@ -64,29 +63,29 @@ module.exports = function () { { test: /\.(sass|scss)$/, - use: ExtractTextPlugin.extract({ - fallback: 'style-loader', - use: [ - { - loader: 'css-loader', - options: { + use: [ + MiniCssExtractPlugin.loader, + + { + loader: 'css-loader', + options: { + sourceMap: true, + importLoaders: 1 + } + }, + + { + loader: 'sass-loader', + options: { + sassOptions: { sourceMap: true, - importLoaders: 1 - } - }, - { - loader: 'sass-loader', - options: { - sassOptions: { - sourceMap: true, - includePaths: [ - helpers.root('src/sass/include') - ] - } + includePaths: [ + helpers.root('src/sass/include') + ] } } - ] - }) + } + ] }, { @@ -111,23 +110,12 @@ module.exports = function () { }, plugins: [ - new ExtractTextPlugin({ + new MiniCssExtractPlugin({ filename: process.env.ANALYZE_BUNDLE === 'true' ? '[name].css' : '[name].[hash].css' }), - new PurifyCSSPlugin({ - paths: [ - helpers.root('src/standalone/videos/embed.ts'), - helpers.root('src/standalone/videos/test-embed.html') - ], - purifyOptions: { - minify: true, - whitelist: [ '*vjs*', '*video-js*' ] - } - }), - new HtmlWebpackPlugin({ template: 'src/standalone/videos/embed.html', filename: 'embed.html',