2022-08-04 11:12:22 +02:00
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: {
|
2022-08-27 14:32:20 +02:00
|
|
|
main: './main.tsx',
|
2022-08-04 11:12:22 +02:00
|
|
|
'pdf.worker': 'pdfjs-dist/build/pdf.worker.entry',
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
use: 'ts-loader',
|
|
|
|
exclude: /node_modules/,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/i,
|
|
|
|
use: ['style-loader', 'css-loader'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
|
|
},
|
2022-10-12 16:43:56 +02:00
|
|
|
performance: {
|
|
|
|
// Disable warnings - "WARNING in entrypoint size limit: The following
|
|
|
|
// entrypoint(s) combined asset size exceeds the recommended limit (244
|
|
|
|
// KiB). This can impact web performance."
|
|
|
|
hints: false,
|
|
|
|
},
|
2022-08-04 11:12:22 +02:00
|
|
|
output: {
|
|
|
|
filename: '[name].js',
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
clean: true,
|
|
|
|
},
|
|
|
|
};
|