Ensure pdf.js and the viewer are using the same versions.
This commit is contained in:
parent
f015947cca
commit
4e6009c530
1 changed files with 7 additions and 0 deletions
|
|
@ -3,6 +3,13 @@ const path = require('path');
|
|||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
const package = require('./package.json');
|
||||
const versionPdfJs = package.dependencies['pdfjs-dist'];
|
||||
const versionPdfJsViewer = package.dependencies['pdfjs-dist-viewer-min'];
|
||||
if (versionPdfJs !== versionPdfJsViewer) {
|
||||
throw new Error('PDF.js (' + versionPdfJs + ') and the viewer (' + versionPdfJsViewer + ') must use the same versions.');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
'loader': path.join(__dirname, 'src', 'loader.js'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue