Skip to content

Commit 29f1496

Browse files
authored
Merge pull request #99 from LibreSign/chore/bump-dependencies
chore: bump dependencies
2 parents 60b6a39 + 6daec57 commit 29f1496

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@libresign/vue-pdf-editor",
33
"description": "vue2 pdf editor component",
4-
"version": "1.2.7",
4+
"version": "1.3.0",
55
"author": "LibreCode",
66
"private": false,
77
"main": "dist/vue-pdf-editor.umd.js",
@@ -18,25 +18,25 @@
1818
"lint:fix": "vue-cli-service lint"
1919
},
2020
"dependencies": {
21-
"@cantoo/pdf-lib": "^1.20.2",
22-
"blob-stream-i2d": "^1.0.0",
23-
"core-js": "^3.35.1",
21+
"@cantoo/pdf-lib": "^2.2.3",
22+
"blob-stream-i2d": "^1.1.2",
23+
"core-js": "^3.38.1",
2424
"downloadjs": "^1.4.7",
25-
"pdfjs-dist": "^3.11.174",
25+
"pdfjs-dist": "^4.7.76",
2626
"pdfkit": "^0.15.0",
27-
"vue-material-design-icons": "^5.2.0"
27+
"vue-material-design-icons": "^5.3.1"
2828
},
2929
"devDependencies": {
30-
"@babel/core": "^7.23.7",
31-
"@babel/eslint-parser": "^7.23.3",
32-
"@babel/plugin-transform-private-methods": "^7.23.3",
30+
"@babel/core": "^7.26.0",
31+
"@babel/eslint-parser": "^7.25.9",
32+
"@babel/plugin-transform-private-methods": "^7.25.9",
3333
"@vue/cli-plugin-babel": "~5.0.0",
3434
"@vue/cli-plugin-eslint": "^5.0.8",
3535
"@vue/cli-service": "~5.0.0",
36-
"eslint": "^8.57.0",
37-
"eslint-plugin-vue": "^9.22.0",
38-
"postcss": "^8.4.33",
39-
"postcss-load-config": "^5.0.3",
36+
"eslint": "^8.57.1",
37+
"eslint-plugin-vue": "^9.29.1",
38+
"postcss": "^8.4.47",
39+
"postcss-load-config": "^5.1.0",
4040
"tailwindcss": "^3.4.1",
4141
"terser-webpack-plugin": "^5.3.10",
4242
"vue": "^2.7.16",

src/utils/asyncReader.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { getDocument, GlobalWorkerOptions } from 'pdfjs-dist'
2-
import * as pdfjsWorker from 'pdfjs-dist/build/pdf.worker'
3-
GlobalWorkerOptions.workerSrc = pdfjsWorker
2+
GlobalWorkerOptions.workerSrc = '/pdf.worker.min.mjs'
43

54
/**
65
*

vue.config.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
const publicPath = process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : "./";
22
const { defineConfig } = require('@vue/cli-service')
3+
const CopyPlugin = require('copy-webpack-plugin');
4+
35
module.exports = defineConfig({
46
publicPath: publicPath,
57
pages: {
@@ -29,12 +31,23 @@ module.exports = defineConfig({
2931
configureWebpack:{
3032
module: {
3133
rules: [
34+
{
35+
test: /pdf\.worker(\.min)?\.mjs$/,
36+
use: { loader: 'file-loader' },
37+
},
3238
{
3339
test:/\.js$/,
3440
loader: 'babel-loader'
3541
}
3642
]
37-
}
43+
},
44+
plugins: [
45+
new CopyPlugin({
46+
patterns: [
47+
{ from: 'node_modules/pdfjs-dist/build/pdf.worker.min.mjs', to: 'pdf.worker.min.mjs' },
48+
],
49+
}),
50+
]
3851
}
3952

4053
})

0 commit comments

Comments
 (0)