menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Parcel

📦🚀 Blazing fast, zero configuration web application bundler

Channels
Team

Parcel v2 equivalent of includedInParent

August 23, 2019 at 3:07am

Parcel v2 equivalent of includedInParent

August 23, 2019 at 3:07am
I'm working on a v2 Elm transformer, and I'm trying to figure out how to do something like setting includedInParent on a dependency in v1. I need parcel serve to watch dependency files for changes, but they shouldn't be run through the transformer, since they're picked up in the compile step for the entry point. Any suggestions?

August 23, 2019 at 3:08am
You should use asset.addConnectedFile instead of asset.addDependency for those

August 27, 2019 at 2:27am
After calling addConnectedFile on the asset being transformed, I'm still not seeing the server rebuild when dependencies change. I will try to take some time to find/examine the code that handles watching files, but any suggestions would be welcome.