pdfjs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
module.exports = {
|
||||
entry: './src/index.tsx',
|
||||
output: {
|
||||
@@ -37,11 +38,26 @@ module.exports = {
|
||||
template: path.resolve(__dirname, 'src/index.html'),
|
||||
favicon: false,
|
||||
}),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: path.resolve(__dirname, 'node_modules/pdfjs-dist/wasm'),
|
||||
to: 'pdfjs/wasm',
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
devServer: {
|
||||
static: {
|
||||
directory: path.join(__dirname, 'public'),
|
||||
},
|
||||
static: [
|
||||
{
|
||||
directory: path.join(__dirname, 'public'),
|
||||
},
|
||||
{
|
||||
directory: path.resolve(__dirname, 'node_modules/pdfjs-dist/wasm'),
|
||||
publicPath: '/pdfjs/wasm',
|
||||
watch: false,
|
||||
},
|
||||
],
|
||||
compress: true,
|
||||
port: 5173,
|
||||
historyApiFallback: true,
|
||||
|
||||
Reference in New Issue
Block a user