fix build

nostro
Pietro Brenna 2025-06-18 16:22:12 +02:00
parent 4cdd927f47
commit 034a1b1a86
5 changed files with 27800 additions and 4305 deletions

View File

@ -9,7 +9,7 @@
"chrome": "67",
"safari": "11.1"
},
"corejs": 2,
"corejs": "2.0",
"useBuiltIns": "usage" // @babel/polyfill 配置usage 按需加载 ECMAscript 规范库
}
]

21990
package-lock.json generated 100644

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,7 @@
"author": "Wayne (371377785@qq.com)",
"repository": "https://github.com/DingRui12138/vue-pdf-viewer",
"scripts": {
"prepare": "webpack build",
"test": "webpack -v",
"build": "webpack build --progress",
"serve": "webpack serve --config webpack.dev.config.js --hot",
@ -25,7 +26,8 @@
"lint:fix": "eslint src/** --fix"
},
"dependencies": {
"pdfjs-dist": "2.12.313"
"pdfjs-dist": "2.12.313",
"sass": "^1.89.2"
},
"devDependencies": {
"@babel/core": "^7.14.2",
@ -42,16 +44,13 @@
"eslint-plugin-vue": "^7.10.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.3.2",
"node-sass": "^6.0.1",
"prettier": "^2.3.0",
"sass-loader": "^12.3.0",
"sass-loader": "^16.0",
"strip-ansi": "^7.0.1",
"style-loader": "^3.3.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^4.1.1",
"vue": "^2.6.12",
"vue-loader": "^15.9.7",
"vue-loader-next": "npm:vue-loader@^16.2.0",
"vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.6.14",
"webpack": "5",

View File

@ -1,8 +1,8 @@
/* eslint-disable no-undef */
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
// const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const { VueLoaderPlugin: Vue2LoaderPlugin } = require('vue-loader')
const { VueLoaderPlugin: Vue3LoaderPlugin } = require('vue-loader-next')
// const { VueLoaderPlugin: Vue3LoaderPlugin } = require('vue-loader-next')
const baseConfig = {
mode: 'production',
@ -24,6 +24,7 @@ const baseConfig = {
chrome: '67',
safari: '11.1',
},
corejs: '2.0',
useBuiltIns: 'usage',
},
],
@ -70,11 +71,11 @@ const baseConfig = {
],
},
optimization: {
minimizer: [
new UglifyJsPlugin({
parallel: true,
}),
],
// minimizer: [
// new UglifyJsPlugin({
// parallel: true,
// }),
// ],
},
externals: {
vue: 'vue',
@ -96,15 +97,15 @@ module.exports = [
},
plugins: [new Vue2LoaderPlugin()],
},
{
...baseConfig,
output: {
filename: 'vue3-pdf-viewer.js',
library: {
name: 'pdf-viewer-vue',
type: 'umd',
},
},
plugins: [new Vue3LoaderPlugin()],
},
// {
// ...baseConfig,
// output: {
// filename: 'vue3-pdf-viewer.js',
// library: {
// name: 'pdf-viewer-vue',
// type: 'umd',
// },
// },
// plugins: [new Vue3LoaderPlugin()],
// },
]

10067
yarn.lock

File diff suppressed because it is too large Load Diff