aspect-build / aspect-build/rules_js

[Bug]: Some files are processed twice using different relative paths

Open
#2,081 4 comments 0 reactions 0 assignees View on GitHub
bug need: investigation
Dominant language
Starlark
Stars
378
Forks
183
Avg merge
1d 9h
Merged PRs (30d)
32

Description

### What happened?

Sorry for the somewhat vague title, but I'm not _exactly_ sure what's actually wrong.

I'm trying to add PrimeVue to a project using Bazel + Vue, but it isn't working in the way that I expect. Possibly my understanding / expectations are wrong here, but I'm not very experienced with front-end / JavaScript build systems so 🤷.

**Expected behaviour**: using PrimeVue with Bazel + `rules_js` works
**Actual behaviour**: PrimeVue itself seems to work, but the built-in styling does not
**Steps to reproduce**: see https://github.com/swarren12/rules_js-primevue-reproduction

**More details**

As mentioned, I have a project using Bazel, `rules_js` and Vue and, as far as I can tell, it's working correctly; however, when I introduce PrimeVue it doesn't behave as expected.

For some reason, I get _some_ of the PrimeVue behaviour, but not _all_ of it - specifically, it seems that some aspect of the theming isn't playing nicely with the `rules_js` build process. Bypassing Bazel completely and running via raw `npm` makes things work as expected, which is why I believe that this is a problem with `rules_js` rather than Vite or PrimeVue.

Hopefully the reproduction is enough to determine whether this is an actual issue or just user-error 😅

### Version

Development (host) and target OS/architectures:

Output of `bazel --version`: `bazel 8.0.0`

Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file:

```
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "aspect_rules_js", version = "2.1.3")
```

Language(s) and/or frameworks involved:
- Vue
- PrimeVue

### How to reproduce

```shell
https://github.com/swarren12/rules_js-primevue-reproduction
```

### Any other information?

The example reproduction has both a "production" build target as well as a development one; from what I can tell, both are affected (i.e. `run //example:example/dev-mode` and `build //example` will both exhibit the same problem) but it's easier to reproduce using the development build.

Contributor guide

Open the contributing guide

Research direction

Start with the linked rules_js-primevue-reproduction and run `bazel run //example:example/dev-mode` and `bazel build //example`, then compare both results with the raw npm workflow. Trace why PrimeVue styling differs under the Bazel builds and confirm that the reproduction's production and development targets both render the expected styling without duplicate relative-path processing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, vite
Domain
build-system, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.