diff --git a/tfjs-tfdf/BUILD.bazel b/tfjs-tfdf/BUILD.bazel index 97296d1fbb0..5f39e913f38 100644 --- a/tfjs-tfdf/BUILD.bazel +++ b/tfjs-tfdf/BUILD.bazel @@ -29,13 +29,16 @@ tfjs_bundle( "@tensorflow/tfjs-converter", "path", "fs", - "jszip", ], globals = { "@tensorflow/tfjs-converter": "tf", "@tensorflow/tfjs-core": "tf", - "jszip": "JSZip", }, + leave_as_require = [ + "path", + "fs", + "crypto", + ], umd_name = "tfdf", deps = [ "//tfjs-tfdf/src:tfdf_web_api_client_js", @@ -92,7 +95,6 @@ pkg_npm( ":copy_bundles", ":copy_src_to_dist", ":copy_wasm_files", - "//tfjs-tfdf/wasm:wasm_files", ], ) diff --git a/tfjs-tfdf/package.json b/tfjs-tfdf/package.json index a7583241533..a51434c2f8b 100644 --- a/tfjs-tfdf/package.json +++ b/tfjs-tfdf/package.json @@ -3,10 +3,16 @@ "version": "0.0.1", "description": "TensorFlow Decision Forests support for TensorFlow.js", "main": "dist/tf-tfdf.node.js", - "module": "dist/index.js", + "module": "dist/tf-tfdf.fesm.js", "jsdelivr": "dist/tf-tfdf.min.js", "unpkg": "dist/tf-tfdf.min.js", "types": "dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/tf-tfdf.fesm.js", + "require": "./dist/tf-tfdf.node.js" + } + }, "repository": { "type": "git", "url": "https://github.com/tensorflow/tfjs.git",