how to include the CSS for custom widgets when using arcgis-js-cli?

232
1
06-27-2019 08:58 AM
JohnCartwright3
New Contributor II

Hello All,

I've got a simple 4.x application that I've scaffolded out using the @arcgis/cli.  I've created a custom widget using the "arcgis widget mywidget" command and it sets up directory structure for the widget like:

widgets/Mywidget/styles/Mywidget.scss

 

My problem is that I can't find out to get the scss file for the custom widget to be included in the build so the styles are picked up.

Can anyone offer a suggestion?

Thanks!

--john

0 Kudos
1 Reply
JohnCartwright3
New Contributor II

answering my own question...

It seems the solution is to add a line like the following to src/css/main.scss:

@import "../widgets/Mywidget/styles/Mywidget"