Closed kappaisagreekletter closed 1 year ago
Yea, there appears to be an issue with recursively copying directories right now. We are attempting to track down what is causing this. Thanks for the report!
I think I am having the same problem.
I have one more example. I was trying to configure dotenvy_macro = "0.15.7"
to set up some env vars during compile time so that the production\test builds have correct values, but it resulted in infinity loop for the test build
Trunk.toml
[[hooks]]
stage = "pre_build"
command = "sh"
command_arguments = ["-c", "echo 'BACKEND_ENDPOINT=http://backend:8081' > $TRUNK_SOURCE_DIR/.env"]
[[hooks]]
stage = "post_build"
command = "sh"
command_arguments = ["-c", "echo 'BACKEND_ENDPOINT=http://localhost:8081' > $TRUNK_SOURCE_DIR/.env"]
it works fine when I run trunk build --release
but trunk serve
goes into an infinity loop
I believe the fix in https://github.com/thedodd/trunk/pull/516 should work here too. I have this running for a while and don't have those issues any longer.
Unfortunately that PR doesn't seem to get any attention, so am leaning towards forking the project and releasing this on crates.io, because we do need this in our team. (and please don't see this as a complaint! we all have limited time!) But the more interest there is, the more this makes sense to me.
And there is a second way to fix this in PR https://github.com/thedodd/trunk/pull/569 … which also isn't getting merged :shrug:
Hi, I wanted to make use of css-modules while porting my react site to yew + trunk. I could not get this to not go into an infinite loop. I even tried setting it so that it doesn't reload automatically in Trunk.toml as well as telling trunk to ignore the dir with the css file that is created by css-modules.
Anyway, let's get to the code:
./html.index
./Trunk.toml
./cargo.toml
./build.rs
./src/main.rs
./src/test.css
Here is a snippet of what to expect: