Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document migration from pkg_web #271

Open
alexeagle opened this issue Jul 5, 2022 · 4 comments
Open

Document migration from pkg_web #271

alexeagle opened this issue Jul 5, 2022 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@alexeagle
Copy link
Member

I think it's some combo of "use some other packaging rule from rules_pkg" and #254. Maybe we can expose a macro that is a close approximation.

@gregmagolan gregmagolan added the documentation Improvements or additions to documentation label Aug 3, 2022
@ss185994
Copy link

is there an appropriate way to migrate from pkg_web in rules_nodejs to rules_js?

@alexeagle
Copy link
Member Author

In migrations I've been doing, I simply removed pkg_web since the bundler produced a directory that could be directly deployed.

Can you give an example of how you're using it - what inputs you give it and what output you expect? I think rules_pkg should cover most use cases.

@ss185994
Copy link

ss185994 commented Jan 11, 2023

this Is how it was setup with rules_nodejs

cmd/web/provider

container_image(
    name = "some-image",
    base = ":some-container",
    files = ["//path/to/web/iam"],
    ports = ["8080"],
    tags = ["manual"],
)

cmd/web/iam

pkg_web(
     name = "iam",
     srcs = [":build"], // result of react-scripts build
     substitutions = {"placeholder": "some_semver"},
     visibility = ["//visibility:public"],
 )

ive gotten the react-cra example more or less working would it be as easy as tossing the result of build to the container_image?

@alexeagle
Copy link
Member Author

Yes exactly your pkg_web might not be doing anything extra there. Were you relying on it to stamp something? You can just compare the container layers before and after to convince yourself it produces the same result (or identify what needs to be changed to get it to match)

@gregmagolan gregmagolan moved this to 🔖 Ready in Open Source Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: On Deck
Development

No branches or pull requests

3 participants