Packaging scss in addon doesn't work

Hi,

I try to package scss in an addon but it doesn’t work…

I followed the wikki page
https://vaadin.com/wiki/-/wiki/Main/Packaging+SCSS+or+CSS+in+an+add-on

I created a test project using the
vaadin-archetype-widget
. My artifactId is named as
widget-test
.
So I created
VAADIN/addons/widget-test/widget-test.scss
in
Resources
folder.
Then I added in the
pom.xml
in manifestEntries block:
VAADIN/addons/widget-test/widget-test.scss


After running mvn install, I can see in the jar the VAADIN/addons/widget-test/widget-test.scss and the entry VAADIN/addons/widget-test/widget-test.scss in the MANIFEST.MF.

The jar is imported automatically in the project widget-test-demo. Normally the
addons.scss
file should have been updated automatically but it’s not updated… I add manually the entry in the addons.scss:

[code]
/* This file is automatically managed and will be overwritten from time to time. /
/
Do not manually edit this file.
@import “…/…/…/VAADIN/addons/widget-test/widget-test.scss”;

/* Import and include this mixin into your project theme to include the addon themes */
@mixin addons {

@include widget-test;

}
[/code]When I run the project widget-test-demo, the scss is not displayed…

Am I missing something?
Thanks

21053.zip (67.4 KB)

I guess you should move the VAADIN folder from src/main/webapp to src/main/resources in widget-test-demo

Hi Haijian,

thanks for the reply but it doesn’t work. I have also a warning because vaadin is looking in folder webapp.

Anyway I created a new project and it’s working. I am able to use th scss of my addon. The addons.scss is still not updated automatically. I need to insert lines manually… I dont know why it’s working now…

It’s a shame there is no stable procedure…