rules_nodejs icon indicating copy to clipboard operation
rules_nodejs copied to clipboard

concatjs_devserver incorrectly depends on rules_webtesting

Open mattem opened this issue 4 years ago • 13 comments

As seen by @farcaller, concatjs_devserver should not have a dependency on rules_webtesting.

mattem avatar Feb 02 '21 02:02 mattem

I ran into this too, worked around it by importing like this:

load("@npm//@bazel/concatjs/devserver:concatjs_devserver.bzl", concatjs_devserver = "concatjs_devserver_macro")

bduffany avatar Feb 28 '21 22:02 bduffany

Also, concatjs_devserver depends on @bazel_skylib: https://app.buildbuddy.io/invocation/7756c70e-91f1-492c-8ab1-3a794ffabd1c#log

bduffany avatar Mar 06 '21 19:03 bduffany

Oh! That's a bug in packaging, nice find

mattem avatar Mar 06 '21 20:03 mattem

Filed #2510 for packaging

mattem avatar Mar 06 '21 20:03 mattem

This issue has been automatically marked as stale because it has not had any activity for 90 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!

github-actions[bot] avatar Jun 05 '21 03:06 github-actions[bot]

I'm still seeing this issue

ahahn95 avatar Mar 10 '22 13:03 ahahn95

The concatjs package is in "maintenance mode" so I don't think anyone is going to fix this.

alexeagle avatar Mar 10 '22 13:03 alexeagle

@alexeagle If concatjs is in maintenance mode what would you recommend as a bundler that follows the ibazel protocol?

Mivr avatar Mar 16 '22 08:03 Mivr

I made a patch to npm's liveserver that allows to use it with ibazel. I bundled it all with rollup.

farcaller avatar Mar 16 '22 09:03 farcaller

@farcaller Thank you for the preposition, I also found this: https://github.com/bazelbuild/rules_nodejs/pull/2431/files (Webpack 5 serve using ibazel, I have not tested it though)

I am actually looking for a solution that is maintained, as the mentioned ones are nice but I do not expect to be able to file a bug and the bug to be fixed. Of course, a self-maintained solution is also an option, but it looks weird to have to write your own dev server rule in order to have any dev server at all, this is a problem mostly for POC or very small projects. I know bazel is not for small projects, but POC for large codebases are small and need quick solutions.

Mivr avatar Mar 16 '22 15:03 Mivr

I guess a good thing about liveserver is that it's pretty limited in what it does, so there's little to fix (in fact it's abandonware but still overwhelmingly popular). But yeah, I wasn't much excited about maintaining an ibazel patch.

farcaller avatar Mar 16 '22 17:03 farcaller

aspect-build/rules_webpack has an ibazel-aware devserver.

Otherwise yeah it's a missing feature in general, I think big companies are rolling their own.

alexeagle avatar Mar 16 '22 20:03 alexeagle

@alexeagle Thank you very much these rules look great! I will definitely use these rules in a POC for the organization I work for.

Mivr avatar Mar 17 '22 19:03 Mivr

No longer in scope for rules_nodejs which only supplies the Node.js toolchain as of v6.0.0.

Downstream canonical JavaScript + Node.js ruleset is now https://github.com/aspect-build/rules_js.

gregmagolan avatar Jun 08 '24 21:06 gregmagolan