From 98bce1b0da675715b2e5482c0ad61ba21135f62f Mon Sep 17 00:00:00 2001
From: Server-Bibliothek <server-bibliothek@lokal>
Date: Di, 04 Aug 2026 07:00:04 +0200
Subject: [PATCH] Add a desktop client that knows what is installed locally

---
 packages/bibliothek-client/webpack.config.js |   61 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/packages/bibliothek-client/webpack.config.js b/packages/bibliothek-client/webpack.config.js
new file mode 100644
index 0000000..0665be4
--- /dev/null
+++ b/packages/bibliothek-client/webpack.config.js
@@ -0,0 +1,61 @@
+import path from 'path';
+import { fileURLToPath } from 'url';
+import HtmlWebpackPlugin from 'html-webpack-plugin';
+
+const __dirname = path.dirname(fileURLToPath(import.meta.url));
+const isProduction = process.env.NODE_ENV === 'production';
+
+export default {
+  mode: isProduction ? 'production' : 'development',
+  entry: './src/index.ts',
+  devtool: isProduction ? false : 'inline-source-map',
+  experiments: {
+    topLevelAwait: true,
+  },
+  module: {
+    rules: [
+      {
+        test: /\.ts$/,
+        use: 'ts-loader',
+        exclude: /node_modules/,
+      },
+      {
+        test: /\.css$/i,
+        resourceQuery: { not: [/raw/] },
+        use: ['style-loader', 'css-loader'],
+      },
+      {
+        // Import mit ?raw liefert den CSS-Quelltext als String (zum Umschalten
+        // der Theme-Defines zur Laufzeit).
+        resourceQuery: /raw/,
+        type: 'asset/source',
+      },
+      {
+        test: /\.(woff|woff2|ttf|eot|svg|png|jpg|gif|ico)$/i,
+        type: 'asset',
+      },
+    ],
+  },
+  resolve: {
+    extensions: ['.ts', '.js'],
+  },
+  plugins: [
+    new HtmlWebpackPlugin({
+      template: 'src/index.html',
+    }),
+  ],
+  devServer: {
+    host: '0.0.0.0',
+    port: 5000,
+    open: false,
+    proxy: [{ context: ['/api'], target: 'http://localhost:3000' }],
+  },
+  output: {
+    path: path.resolve(__dirname, 'dist'),
+    filename: 'index.[contenthash].js',
+    clean: true,
+  },
+  stats: {
+    errorDetails: true,
+  },
+};

--
Gitblit v1.9.3