Skip to content

Commit 7ab262e

Browse files
authored
fix: js_binary needs to see type:module (#876)
Fixes ``` node:97733) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///Users/alexeagle/Library/Caches/bazel/_bazel_alexeagle/01f2ac883bc99a4cd7d1820c0ae3536f/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/packages/hello/hello_/hello.runfiles/_main/packages/hello/index.js is not specified and it doesn't parse as CommonJS. Reparsing as ES module because module syntax was detected. This incurs a performance overhead. To eliminate this warning, add "type": "module" to /Users/alexeagle/Library/Caches/bazel/_bazel_alexeagle/01f2ac883bc99a4cd7d1820c0ae3536f/execroot/_main/package.json. ```
1 parent 5734980 commit 7ab262e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

{{ .ProjectSnake }}/.aspect/gazelle/package-json-scripts.axl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def declare_targets(ctx):
1717
kind = "js_binary",
1818
attrs = {
1919
"entry_point": cmd_parts[-1],
20-
"data": [":node_modules"],
20+
"data": [":node_modules", "package.json"],
2121
},
2222
)
2323
else:

0 commit comments

Comments
 (0)