blob: cb3cefc8feca3e0af55181b9319776b7839e7fa9 [file] [log] [blame]
load("@aspect_rules_js//js:defs.bzl", "js_library", "js_test")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@npm//examples/webpack_cli:webpack-cli/package_json.bzl", "bin")
npm_link_all_packages(
name = "node_modules",
)
js_library(
name = "lib",
srcs = [
"index.css.ts",
"index.js",
"package.json",
],
deps = [
":node_modules/@vanilla-extract/css",
":node_modules/@vanilla-extract/webpack-plugin",
":node_modules/css-loader",
":node_modules/mathjs",
":node_modules/mini-css-extract-plugin",
],
)
bin.webpack_cli(
name = "bundle",
srcs = [
":lib",
":webpack.config.js",
],
outs = [
"dist/main.js",
],
args = [
"--config webpack.config.js",
],
chdir = package_name(),
log_level = "debug",
)
js_test(
name = "test",
entry_point = "dist/main.js",
)