In a CustomComponent
of Vaadin 7, we have the annotation:
@StyleSheet({"../../VAADIN/themes/mytheme/views/someView.css"})
And it works fine while productionMode
is false
.
The file in question is an independent style sheet not referenced by styles.scss
However, once productionMode
is set to true
, Vaadin doesn't compile the corresponding .scss
at run time, which is an expected behavior.
I know there is a com.vaadin.sass.SassCompiler
, but I couldn't find a documentation of how to use it with maven, so non-theme .scss
are compiled during the build.
Below is the vaadin-maven-plugin
usage:
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>7.7.13</version>
<configuration>
<extraJvmArgs>-Xmx1024M -Xss2048k</extraJvmArgs>
<noServer>true</noServer>
<webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets</webappDirectory>
<compileReport>false</compileReport>
<style>OBF</style>
<strict>true</strict>
</configuration>
<executions>
<execution>
<configuration>
<!-- if you don't specify any modules, the plugin will find them -->
<!-- <modules> <module>com.vaadin.demo.mobilemail.gwt.ColorPickerWidgetSet</module>
</modules> -->
</configuration>
<goals>
<goal>resources</goal>
<goal>compile</goal>
<goal>compile-theme</goal>
<goal>update-theme</goal>
</goals>
</execution>
</executions>
</plugin>