EN · DE · RU · FR · ES

#2767: webpack.config.js

projectforge-webapp/webpack.config.js Webpack Configuration (Legacy) · projectforge-webapp/webpack.config.js 17 lines · 14 code · 3 comments · 0 blank
A minimal webpack configuration file that provides only SCSS/SASS compilation rules — a single module rule that chains sass-loadercss-loaderstyle-loader for .scss and .sass files. This file was created when the project migrated from node-sass (a native Node.js binding to the C/C++ LibSass compiler, which had compatibility issues in Docker Linux containers) to sass-loader backed by Dart Sass (a pure JavaScript implementation). The file remains in the repository as a vestige of the pre-Vite build system.

Architecture

Legacy Status

With the Vite migration (commit bf988bc6d), this webpack config is no longer the primary build tooling. Vite handles all transformation through its own plugin system. The file persists for two reasons: the Gradle-based build may invoke webpack for specific asset processing tasks that haven't been migrated, and as a reference for the SCSS loader pipeline that Vite's configuration replicates.

SCSS Pipeline

The loader chain processes right to left (bottom to top in the use array): sass-loader compiles SCSS to CSS, css-loader resolves @import and url() references into JavaScript modules, style-loader injects the CSS into the DOM as <style> tags at runtime. This is the standard webpack CSS pipeline, now superseded by Vite's native CSS handling.

Git History

CommitWhat changed
b482cd4e1Created the file with the SCSS loader configuration. The commit message explicitly states the motivation: switching from node-sass to sass-loader with Dart Sass, because node-sass (which requires native C++ compilation) was failing to work correctly under Docker Linux images. This was a deployment stability fix rather than a feature addition.