diff --git a/package.json b/package.json index e7f57623b6c66fe04414728e68c59d8bb3f2e78d..f393527cdb0be58bcad51a825cb5a1d26d9f5617 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 b4b6f0d649c9667e0e180b2e0a72fdf936cf7cbc..f2019902bcbae20ad92712d5255e9a9f34fe22f4 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 ae9efe8bd64b1ea00da44d1486541fe85ea828f9..2278cc26f8c3ac50af43a061ce4dd57f2a78dd51 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'], - } + }, };