1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

fix stylesheets compilation with webpack

This commit is contained in:
Sylvain 2020-09-22 09:45:18 +02:00
parent f3be8961cf
commit 5764233c67
4 changed files with 42 additions and 29 deletions

View File

@ -1,3 +1 @@
/* @import "~fullcalendar/dist/fullcalendar.print";
*= require fullcalendar/dist/fullcalendar.print
*/

View File

@ -1,17 +1,19 @@
module.exports = { const getStyleRule = require('@rails/webpacker/package/utils/get_style_rule');
test: /\.(scss|sass)$/i,
use: [ module.exports = getStyleRule(/\.(scss|sass)$/i, false, [
{ {
loader: 'css-loader', loader: 'resolve-url-loader',
options: { options: {
sourceMap: true sourceMap: true
}
},
{
loader: 'resolve-url-loader'
},
{
loader: 'sass-loader'
} }
] },
}; {
loader: 'sass-loader',
options: {
sourceMap: true,
sassOptions: {
includePaths: ['app/frontend/src/stylesheets']
}
}
}
]);

View File

@ -1,9 +1,22 @@
module.exports = { const getStyleRule = require('@rails/webpacker/package/utils/get_style_rule');
test: /\.(scss|sass)\.erb$/,
enforce: 'pre', module.exports = getStyleRule(/\.(scss|sass)\.erb$/, false, [
exclude: /node_modules/, {
loader: [ loader: 'resolve-url-loader',
'sass-loader', options: {
'rails-erb-loader' sourceMap: true
] }
}; },
{
loader: 'sass-loader',
options: {
sourceMap: true,
sassOptions: {
includePaths: ['app/frontend/src/stylesheets']
}
}
},
{
loader: 'rails-erb-loader'
}
]);

View File

@ -16,7 +16,7 @@ default: &default
cache_manifest: false cache_manifest: false
# Extract and emit a css file # Extract and emit a css file
extract_css: false extract_css: true
static_assets_extensions: static_assets_extensions:
- .jpg - .jpg