This repository was archived by the owner on Jun 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ load("@npm//@bazel/typescript:index.bzl", "ts_library")
44load ("@build_bazel_rules_nodejs//:index.bzl" , "pkg_npm" )
55load ("@npm//@bazel/rollup:index.bzl" , "rollup_bundle" )
66
7- ### Produce umd and cjs bundles
7+ ### Produce umd, cjs and esm bundles
88
99ts_library (
1010 name = "dev" ,
@@ -28,6 +28,7 @@ ts_library(
2828 )
2929 for format , args in {
3030 "cjs" : [],
31+ "esm" : [],
3132 "umd" : [
3233 # Downlevel (transpile) to ES5.
3334 "-p" ,
@@ -67,6 +68,23 @@ pkg_npm(
6768 ],
6869)
6970
71+ genrule (
72+ name = "incremental-dom-esm" ,
73+ srcs = [":bundle.esm.js" ],
74+ outs = ["dist/incremental-dom-esm.js" ],
75+ cmd = "cp $(locations :bundle.esm.js) $@" ,
76+ )
77+
78+ pkg_npm (
79+ name = "npm-esm" ,
80+ substitutions = {
81+ "const DEBUG = true;" : "const DEBUG = false;" ,
82+ },
83+ deps = [
84+ ":incremental-dom-esm" ,
85+ ],
86+ )
87+
7088### Produce minified bundle
7189
7290## Create a second index so that it can have a reference to the release/ directory.
@@ -131,6 +149,7 @@ pkg_npm(
131149 ],
132150 nested_packages = [
133151 ":npm-cjs" ,
152+ ":npm-esm" ,
134153 ":npm-min" ,
135154 ":npm-umd" ,
136155 ],
Original file line number Diff line number Diff line change 22 "name" : " incremental-dom" ,
33 "version" : " 0.7.0" ,
44 "description" : " An in-place virtual DOM library" ,
5+ "exports" : " dist/incremental-dom-esm.js" ,
56 "main" : " dist/incremental-dom-cjs.js" ,
67 "author" : " The Incremental DOM Authors" ,
78 "license" : " Apache-2.0" ,
You can’t perform that action at this time.
0 commit comments