forcedotcom / lwc-dev-server-feedback

LWC Local Development
BSD 3-Clause "New" or "Revised" License
45 stars 10 forks source link

Add Static Resource Global CSS #21

Open KelvinHuangDZ opened 4 years ago

KelvinHuangDZ commented 4 years ago

How can I add my global style sheet which is stored in Static Resource into this local dev server?

mysticflute commented 4 years ago

Hi, can you please explain a little more what you are trying to do, including what you currently do when pushing your code to your org?

KelvinHuangDZ commented 4 years ago

Hi, i'm building a Community Portal through community builder. I have a Global css saved in Static Resource which is loaded in Page Layout. I wish to know when i run the LWC in local, is there a way i can include the css in a global level. without me loadStyle in each single component.

mysticflute commented 4 years ago

Thanks for the explanation. There isn't a good way to do this right now, but in the future we have plans to allow for "custom containers", which will be a way for you to have more control over the preview page layout and code.

KelvinHuangDZ commented 4 years ago

Thanks. Looking forward to it

wwwmonkey commented 4 years ago

Ditto, on a project I am working with static global resources (CSS,JS) are added by the wrapping Aura template. Hence all components do not render correctly. Is there a workaround?