You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use SASS (.scss) stylesheets under /frontend/styles. These are imported and fully supported by Vite. It seems that the vaadin:stats Vite plugin does not generate hashes for them and store in stats.json#frontendHashes. Because of this, even with prod.bundle, the Vaadin Maven/Gradle plugins think there are new files, and thus, do not use the existing bundle.
Describe the solution you'd like
const projectFileExtensions = ['.js', '.js.map', '.ts', '.ts.map', '.tsx', '.tsx.map', '.css', '.css.map']; needs to also support .scss and .sass.
Is there a reason those file extensions are not already included? If not, happy to contribute this simple PR.
Describe alternatives you've considered
I could write a Vite plugin that computes and adds the hashes.
I could create a Gradle task that compiles the SASS files and outputs them to /frontend/styles.
Both options seem messy.
Additional context
I discovered this while investigating ways to speed up our builds, in lieu of Vaadin's proper Gradle caching support. #17941
This idea came from our recent endeavour to speed up builds. Relevant issues:
Describe your motivation
We use SASS (
.scss
) stylesheets under/frontend/styles
. These are imported and fully supported by Vite. It seems that thevaadin:stats
Vite plugin does not generate hashes for them and store instats.json#frontendHashes
. Because of this, even withprod.bundle
, the Vaadin Maven/Gradle plugins think there are new files, and thus, do not use the existing bundle.Describe the solution you'd like
const projectFileExtensions = ['.js', '.js.map', '.ts', '.ts.map', '.tsx', '.tsx.map', '.css', '.css.map'];
needs to also support.scss
and.sass
.Is there a reason those file extensions are not already included? If not, happy to contribute this simple PR.
Describe alternatives you've considered
I could write a Vite plugin that computes and adds the hashes.
I could create a Gradle task that compiles the SASS files and outputs them to
/frontend/styles
.Both options seem messy.
Additional context
I discovered this while investigating ways to speed up our builds, in lieu of Vaadin's proper Gradle caching support. #17941
This idea came from our recent endeavour to speed up builds. Relevant issues:
vaadinPrepareFrontendTask
gradle task is not cached #17941.scss
and.sass
instats.json
hashes #19527FrontendDependencies
#19528filterClasspath
property/closure docs#3477The text was updated successfully, but these errors were encountered: