Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

How to set the external-loader dynamic using the direflow properties that we get. #260

Open
mohiddin21 opened this issue Mar 10, 2022 · 0 comments

Comments

@mohiddin21
Copy link

mohiddin21 commented Mar 10, 2022

Hi All,

I have a requirement where I need to load the external-loader dynamic using direflow properties.

Here is the sample code:
const direflowProperties = {
dynamicurl: '',
};

export default DireflowComponent.create({
component: AppData,
configuration: {
tagname: "sample-comp",
useShadow: true,
},
properties: direflowProperties,
plugins: [
{
name: 'external-loader',
options: {
paths: [
{
src: ${direflowProperties.dynamicurl}src.f69400ca.css,
async: true,
useHead: true
}
],
}
}
]
});

In the above sample code, value for dynamicurl property is available in the AppData component when the web component gets loaded, where as in direflow creation component its not. Please suggest on how to load dynamic external-loader url.

I even tried with useExternalSource hook but no luck.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant