Closed dgp1130 closed 2 years ago
As part of https://github.com/dgp1130/rules_prerender/issues/50, I need to turn off link_workspace_root
for a number of targets to avoid a conflict with package_name = "rules_prerender"
in the declarative shadow DOM target. There's no easy path to fixing this conflict aside from dropping link_workspace_root
everywhere.
Alternatively, we could rename the workspace to be a different name than rules_prerender
, but given that link_workspace_root
is going away in rules_js
, I don't think this is a viable long term solution.
Successfully removed link_workspace_root = True
by converting all absolute imports to relative ones. Not elegant, but it's the minimal solution to this problem.
There are still two link_workspace_root = True
usages with rollup_bundle()
, but that's a different problem I can tackle separately. I think this is good enough to call it fixed.
I'll follow up on the more general project restructuring in https://github.com/dgp1130/rules_prerender/issues/51/.
link_workspace_root = True
is a bit of an antipattern. This appears to be going away inrules_js
/rules_ts
.Instead, we should follow a model of:
nested_packages
to vendor common JS without having to publish internal packages.common/
directory and split it into internal-only packages which are imported via their package names and vendored into each published package which uses them.This likely means I'll also need to rethink the publishing story and possibly move to a
@rules_prerender/*
package model, something I want to do anyways, but haven't really gotten around to.Also see discussion in https://github.com/dgp1130/rules_prerender/issues/8.