Hello, very new to hubspot CMS development. I’ve opted to use the cms-react version to develop out some custom landing pages. The setup for local development was pretty easy but figuring out some stuff as I go to make the development experience better. I’m also pretty new to css modules, I would like a global stylesheet to include on my base.hubl.html file. I tried a weird hacky approach to include a js partial which would import the global.css file but then when viewing my custom module the styles aren’t being applied. For now I’ve opted to import the global.css into that module which works for now but wondering if there’s a better approach to this. I’ve also got a typekit stylesheet I’d like to use inside my base.hubl.html file but again when developing the modules and viewing them in isolation they aren’t recieving the styles. Another slightly annoying thing is when importing files you have to type out all the .`./../../styles/global.css` is there a way to config an import alias that points to a specific directory so you could just do `@/styles/global.css` or something similar?
Hi @DCG_Danny and welcome, we are delighted to have you here! ![]()
Thanks for asking the HubSpot Community!
First, I’d like to share some resources that might be of interest:
- Build CMS modules with React
- HTML + HubL templates
- Create, edit, and attach CSS files to style your site
Also, there is this similar thread that you might want to take a look at: “[HubSpot CMS React] How to Add Global CSS for All Modules in Development Server”.
I’d love to put you in touch with our Top Experts: Hi @sylvain_tirreau, @zach_threadint and @Teun do you have suggestions to help @DCG_Danny, please?
Have a lovely day and thanks so much in advance for your valuable contributions! ![]()
Bérangère