36eaf7fd58
* chore(NA): enables @babel/plugin-transform-runtime to decrease output size * chore(NA): update @kbn/pm bundle * chore(NA): missing config on corejs for runtime * fix(NA): flaky unit test * chore(NA): update limits file * chore(NA): remove corejs * chore(NA): old config files * chore(NA): update limmits file * chore(NA): updated yarn lock file * chore(NA): update limits * chore(NA): restore original test file * chore(NA): skip flaky test * chore(NA): skip another failing test
67 lines
1.4 KiB
Python
67 lines
1.4 KiB
Python
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
|
|
|
|
PKG_BASE_NAME = "kbn-babel-preset"
|
|
PKG_REQUIRE_NAME = "@kbn/babel-preset"
|
|
|
|
SOURCE_FILES = glob([
|
|
"common_babel_parser_options.js",
|
|
"common_preset.js",
|
|
"istanbul_preset.js",
|
|
"node_preset.js",
|
|
"styled_components_files.js",
|
|
"webpack_preset.js",
|
|
])
|
|
|
|
SRCS = SOURCE_FILES
|
|
|
|
filegroup(
|
|
name = "srcs",
|
|
srcs = SRCS,
|
|
)
|
|
|
|
NPM_MODULE_EXTRA_FILES = [
|
|
"package.json",
|
|
"README.md",
|
|
]
|
|
|
|
DEPS = [
|
|
"@npm//@babel/plugin-proposal-class-properties",
|
|
"@npm//@babel/plugin-proposal-export-namespace-from",
|
|
"@npm//@babel/plugin-proposal-nullish-coalescing-operator",
|
|
"@npm//@babel/plugin-proposal-optional-chaining",
|
|
"@npm//@babel/plugin-proposal-private-methods",
|
|
"@npm//@babel/plugin-transform-runtime",
|
|
"@npm//@babel/preset-env",
|
|
"@npm//@babel/preset-react",
|
|
"@npm//@babel/preset-typescript",
|
|
"@npm//@babel/runtime",
|
|
"@npm//@emotion/babel-preset-css-prop",
|
|
"@npm//babel-plugin-add-module-exports",
|
|
"@npm//babel-plugin-styled-components",
|
|
"@npm//babel-plugin-transform-react-remove-prop-types",
|
|
]
|
|
|
|
js_library(
|
|
name = PKG_BASE_NAME,
|
|
srcs = NPM_MODULE_EXTRA_FILES + [
|
|
":srcs",
|
|
],
|
|
deps = DEPS,
|
|
package_name = PKG_REQUIRE_NAME,
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
pkg_npm(
|
|
name = "npm_module",
|
|
deps = [
|
|
":%s" % PKG_BASE_NAME,
|
|
]
|
|
)
|
|
|
|
filegroup(
|
|
name = "build",
|
|
srcs = [
|
|
":npm_module",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|