Skip to content

use webpack's resolve option for loading scss files instead of hard coding the path

We use this patch -> https://salsa.debian.org/ruby-team/gitlab/blob/0e5f19e402266fdd5bf087e19895633db5f3daa7/debian/patches/0520-add-system-lib-path-for-webpack.patch to tell webpack to use packaged node modules. This works for loading js files.

Would it be possible to do the same for scss files too without hard coding the path?

Currently in app/assets/stylesheets/application.scss it is hard coded.

@import "../../../node_modules/at.js/dist/css/jquery.atwho";
@import "../../../node_modules/pikaday/scss/pikaday";
@import "../../../node_modules/dropzone/dist/basic";
@import "../../../node_modules/select2/select2";

I get the following error -> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930529 when trying to use packaged version of pikaday module. It is installed in /usr/lib/nodejs/pikaday.