This commit is contained in:
2025-11-16 11:36:11 +01:00
parent 7e0768a09a
commit dae66703f2
17 changed files with 1110 additions and 160 deletions
+19 -3
View File
@@ -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,