You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let invalidateOnFileCreate = [];
let invalidateOnFileChange = [];
let invalidateOnEnvChange = [];//************************** and ensure that it available in the returned object
for (let resolver of resolvers) {
try {
let result = await resolver.plugin.resolve({
specifier,
pipeline,
dependency: dep,
options: this.pluginOptions,
logger: new PluginLogger({origin: resolver.name}),
});
if (result) {
if (result.meta) {
dependency.resolverMeta = result.meta;
dependency.meta = {
...dependency.meta,
...result.meta,
};
}
if (result.priority != null) {
dependency.priority = Priority[result.priority];
}
if (result.invalidateOnFileCreate) {
invalidateOnFileCreate.push(...result.invalidateOnFileCreate);
}
if (result.invalidateOnFileChange) {
invalidateOnFileChange.push(...result.invalidateOnFileChange);
}
if (result.invalidateOnEnvChange ) { // *********************
invalidateOnEnvChange .push(...result.invalidateOnEnvChange );
}
🙋 feature request
Allow resolver plugins to return in result - invalidateOnEnvChange string array
🤔 Expected Behavior
In a similar manner to how other plugin types can invalidateOnEnvChange - see Config type https://parceljs.org/plugin-system/transformer/#Config
😯 Current Behavior
Cannot invalidateOnEnvChange
💁 Possible Solution
ResolverRunner resolve
PathRequest after ResolverRunner
🔦 Context
I have created a Resolver that aliases through an environment variable instead of package.json.
I would like to invalidateOnEnvChange.
💻 Examples
(https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977?permalink_comment_id=4166747#gistcomment-4166747)
The text was updated successfully, but these errors were encountered: