Skip to content

Commit

Permalink
chore(NA): add web targets
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic committed Aug 26, 2021
1 parent f71de87 commit 4a3dec2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/kbn-securitysolution-list-api/.babelrc.browser
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["@kbn/babel-preset/webpack_preset"],
"ignore": ["**/*.test.ts", "**/*.test.tsx"]
}
9 changes: 8 additions & 1 deletion packages/kbn-securitysolution-list-api/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ jsts_transpiler(
build_pkg_name = package_name(),
)

jsts_transpiler(
name = "target_web",
srcs = SRCS,
build_pkg_name = package_name(),
config_file = ".babelrc.browser"
)

ts_config(
name = "tsconfig",
src = "tsconfig.json",
Expand All @@ -78,7 +85,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
deps = RUNTIME_DEPS + [":target_node", ":target_web", ":tsc_types"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-securitysolution-list-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"description": "security solution list REST API",
"license": "SSPL-1.0 OR Elastic License 2.0",
"browser": "./target_web/index.js",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"private": true
Expand Down

0 comments on commit 4a3dec2

Please sign in to comment.