From 01ee4d3007b1e4be1cec60490e510751f17213c0 Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Sat, 27 Jan 2024 03:26:27 +0000
Subject: [PATCH] this should be publishable and we can try testing

---
 package.json      | 11 ++++-------
 tsconfig.json     | 19 ++++++++++---------
 webpack.config.js |  8 +++++++-
 3 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/package.json b/package.json
index e7f5762..f393527 100644
--- a/package.json
+++ b/package.json
@@ -2,16 +2,13 @@
     "name": "xxdk-wasm",
     "version": "0.3.6",
     "description": "WebAssembly bindings for xxDK.",
-    "main": "dist/main.ts",
+    "module": "src/index.ts",
     "directories": {
-        "test": "test"
+        "test": "test",
+        "src": "src"
     },
     "files": [
-        "xxdk-channelsIndexedDkWorker.wasm",
-        "xxdk-dmIndexedDkWorker.wasm",
-        "xxdk-logFileWorker.wasm",
-        "xxdk-stateIndexedDkWorker.wasm",
-        "xxdk.wasm"
+        "dist/*"
     ],
     "scripts": {
         "build": "webpack",
diff --git a/tsconfig.json b/tsconfig.json
index b4b6f0d..f201990 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,11 +1,12 @@
 {
-  "compilerOptions": {
-    "outDir": "./dist/",
-    "noImplicitAny": true,
-    "module": "es6",
-    "target": "es6",
-    "jsx": "react",
-    "allowJs": true,
-    "moduleResolution": "node"
-  }
+    "compilerOptions": {
+        "outDir": "./dist/",
+        "noImplicitAny": true,
+        "sourceMap": true,
+        "module": "es6",
+        "target": "es6",
+        "jsx": "react",
+        "allowJs": true,
+        "moduleResolution": "node"
+    }
 }
diff --git a/webpack.config.js b/webpack.config.js
index ae9efe8..2278cc2 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -2,9 +2,15 @@ const path = require('path');
 
 module.exports = {
     entry: './src/index.ts',
+    devtool: 'inline-source-map',
     output: {
         filename: 'bundle.js',
         path: path.resolve(__dirname, 'dist'),
+        globalObject: 'this',
+        library: {
+            name: 'xxdk-wasm',
+            type: 'umd',
+        },
     },
     module: {
         rules: [
@@ -24,5 +30,5 @@ module.exports = {
     },
     resolve: {
         extensions: ['.tsx', '.ts', '.js'],
-    }
+    },
 };
-- 
GitLab