mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-23 05:59:54 +00:00
Fix libarchive bundling
This commit is contained in:
parent
a014f2775e
commit
bec74d2949
@ -5,7 +5,6 @@
|
||||
"not": [
|
||||
"./dist/libraries/pdf.worker.js",
|
||||
"./dist/libraries/worker-bundle.js",
|
||||
"./dist/libraries/wasm-gen/libarchive.js",
|
||||
"./dist/serviceworker.js"
|
||||
]
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
// eslint-disable-next-line import/named, import/namespace
|
||||
import { Archive } from 'libarchive.js';
|
||||
import loading from '../../components/loading/loading';
|
||||
import dialogHelper from '../../components/dialogHelper/dialogHelper';
|
||||
|
@ -4,12 +4,13 @@ const CopyPlugin = require('copy-webpack-plugin');
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const { DefinePlugin } = require('webpack');
|
||||
const { DefinePlugin, IgnorePlugin } = require('webpack');
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
const Assets = [
|
||||
'native-promise-only/npo.js',
|
||||
'libarchive.js/dist/worker-bundle.js',
|
||||
'libarchive.js/dist/libarchive.wasm',
|
||||
'@jellyfin/libass-wasm/dist/js/default.woff2',
|
||||
'@jellyfin/libass-wasm/dist/js/subtitles-octopus-worker.js',
|
||||
'@jellyfin/libass-wasm/dist/js/subtitles-octopus-worker.wasm',
|
||||
@ -17,11 +18,6 @@ const Assets = [
|
||||
'pdfjs-dist/build/pdf.worker.js'
|
||||
];
|
||||
|
||||
const LibarchiveWasm = [
|
||||
'libarchive.js/dist/libarchive.js',
|
||||
'libarchive.js/dist/libarchive.wasm'
|
||||
];
|
||||
|
||||
const DEV_MODE = process.env.NODE_ENV !== 'production';
|
||||
let COMMIT_SHA = '';
|
||||
try {
|
||||
@ -103,13 +99,11 @@ const config = {
|
||||
};
|
||||
})
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: LibarchiveWasm.map(asset => {
|
||||
return {
|
||||
from: path.resolve(__dirname, `./node_modules/${asset}`),
|
||||
to: path.resolve(__dirname, './dist/libraries/wasm-gen')
|
||||
};
|
||||
})
|
||||
// The libarchive.js worker-bundle is copied manually.
|
||||
// If it is automatically bundled, escheck will fail since it uses import.meta.url.
|
||||
new IgnorePlugin({
|
||||
resourceRegExp: /worker-bundle\.js$/,
|
||||
contextRegExp: /libarchive.js/
|
||||
}),
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
typescript: {
|
||||
|
Loading…
Reference in New Issue
Block a user