X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fwebpack%2Fwebpack.video-embed.js;h=f5c75dd47597c1cfa357b7ec9ef9a8ecc4d12a17;hb=c53853ca1b8e32aea5259d436d3d284b9d178919;hp=8320d01e71d5d3bd49cecced17809da12784228e;hpb=adb8809d43648ea0a64d6845bb39aa3bd0e005a6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js index 8320d01e7..f5c75dd47 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') @@ -70,7 +69,24 @@ module.exports = function () { { loader: 'ts-loader', options: { - configFile: 'tsconfig.json' + configFile: helpers.root('tsconfig.json') + } + } + ] + }, + { + test: /\.m?js$/, + use: [ + { + loader: 'babel-loader', + options: { + presets: [ + [ + '@babel/preset-env', { + targets: 'last 1 Chrome version, last 2 Edge major versions, Firefox ESR, Safari >= 11, ios_saf >= 11' + } + ] + ] } } ] @@ -162,20 +178,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') - } - } }) ], @@ -186,6 +188,7 @@ module.exports = function () { ecma: 6, warnings: false, ie8: false, + safari10: true, mangle: true, compress: { passes: 3,