Use packaged version of pdfjs-dist and adapt for worker-loader 3 api
This commit is contained in:
parent
b9bf4c6f03
commit
6a8dc1efe9
4 changed files with 38 additions and 2 deletions
1
debian/control
vendored
1
debian/control
vendored
|
@ -392,6 +392,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||||
node-lodash (>= 4.17.15~),
|
node-lodash (>= 4.17.15~),
|
||||||
node-marked (>= 0.3~),
|
node-marked (>= 0.3~),
|
||||||
node-mousetrap,
|
node-mousetrap,
|
||||||
|
node-pdfjs-dist,
|
||||||
# Include node-pikaday only after @gitlab/ui is accepted
|
# Include node-pikaday only after @gitlab/ui is accepted
|
||||||
# node-pikaday,
|
# node-pikaday,
|
||||||
node-popper.js,
|
node-popper.js,
|
||||||
|
|
14
debian/patches/0740-use-packaged-modules.patch
vendored
14
debian/patches/0740-use-packaged-modules.patch
vendored
|
@ -121,7 +121,7 @@ Use debian packaged node modules when available
|
||||||
"diff": "^3.4.0",
|
"diff": "^3.4.0",
|
||||||
"document-register-element": "1.14.3",
|
"document-register-element": "1.14.3",
|
||||||
"dompurify": "^2.0.11",
|
"dompurify": "^2.0.11",
|
||||||
@@ -85,81 +62,55 @@
|
@@ -85,81 +62,54 @@
|
||||||
"editorconfig": "^0.15.3",
|
"editorconfig": "^0.15.3",
|
||||||
"emoji-regex": "^7.0.3",
|
"emoji-regex": "^7.0.3",
|
||||||
"emoji-unicode-version": "^0.2.1",
|
"emoji-unicode-version": "^0.2.1",
|
||||||
|
@ -160,7 +160,7 @@ Use debian packaged node modules when available
|
||||||
"monaco-editor-webpack-plugin": "^1.9.0",
|
"monaco-editor-webpack-plugin": "^1.9.0",
|
||||||
"monaco-yaml": "^2.4.1",
|
"monaco-yaml": "^2.4.1",
|
||||||
- "mousetrap": "1.6.5",
|
- "mousetrap": "1.6.5",
|
||||||
"pdfjs-dist": "^2.0.943",
|
- "pdfjs-dist": "^2.0.943",
|
||||||
"pikaday": "^1.8.0",
|
"pikaday": "^1.8.0",
|
||||||
- "popper.js": "^1.16.1",
|
- "popper.js": "^1.16.1",
|
||||||
- "prismjs": "^1.21.0",
|
- "prismjs": "^1.21.0",
|
||||||
|
@ -222,3 +222,13 @@ Use debian packaged node modules when available
|
||||||
// See: https://gitlab.com/gitlab-org/gitlab/-/issues/229146
|
// See: https://gitlab.com/gitlab-org/gitlab/-/issues/229146
|
||||||
'@babel/plugin-transform-arrow-functions',
|
'@babel/plugin-transform-arrow-functions',
|
||||||
'lodash',
|
'lodash',
|
||||||
|
--- a/app/assets/javascripts/pdf/index.vue
|
||||||
|
+++ b/app/assets/javascripts/pdf/index.vue
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
<script>
|
||||||
|
import pdfjsLib from 'pdfjs-dist/build/pdf';
|
||||||
|
-import workerSrc from 'pdfjs-dist/build/pdf.worker.min';
|
||||||
|
+import workerSrc from 'pdfjs-dist/build/pdf.worker';
|
||||||
|
|
||||||
|
import page from './page/index.vue';
|
||||||
|
|
||||||
|
|
24
debian/patches/0790-worker-loader-3.patch
vendored
Normal file
24
debian/patches/0790-worker-loader-3.patch
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
From d074f685027a6a8b03bcaaf1f0cb2ff08c167dc9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pirate Praveen <praveen@debian.org>
|
||||||
|
Date: Sun, 6 Dec 2020 18:24:33 +0000
|
||||||
|
Subject: [PATCH] Update worker-loader from 2.x to 3.x
|
||||||
|
|
||||||
|
---
|
||||||
|
config/webpack.config.js | 4 ++--
|
||||||
|
package.json | 2 +-
|
||||||
|
yarn.lock | 46 ++++++++++++++++++++++++++++++++++++++++
|
||||||
|
3 files changed, 49 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- a/config/webpack.config.js
|
||||||
|
+++ b/config/webpack.config.js
|
||||||
|
@@ -230,8 +230,8 @@
|
||||||
|
{
|
||||||
|
loader: 'worker-loader',
|
||||||
|
options: {
|
||||||
|
- name: '[name].[contenthash:8].worker.js',
|
||||||
|
- inline: IS_DEV_SERVER,
|
||||||
|
+ filename: '[name].[contenthash:8].worker.js',
|
||||||
|
+ inline: "fallback",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'babel-loader',
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -30,3 +30,4 @@
|
||||||
0770-remove-rubocop-rspec.patch
|
0770-remove-rubocop-rspec.patch
|
||||||
0770-remove-capybara-screenshot-rspec.patch
|
0770-remove-capybara-screenshot-rspec.patch
|
||||||
0780-css-loader-3.patch
|
0780-css-loader-3.patch
|
||||||
|
0790-worker-loader-3.patch
|
||||||
|
|
Loading…
Reference in a new issue