1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +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 @@
/*
*= require fullcalendar/dist/fullcalendar.print
*/
@import "~fullcalendar/dist/fullcalendar.print";

View File

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

View File

@ -1,9 +1,22 @@
module.exports = {
test: /\.(scss|sass)\.erb$/,
enforce: 'pre',
exclude: /node_modules/,
loader: [
'sass-loader',
'rails-erb-loader'
]
};
const getStyleRule = require('@rails/webpacker/package/utils/get_style_rule');
module.exports = getStyleRule(/\.(scss|sass)\.erb$/, false, [
{
loader: 'resolve-url-loader',
options: {
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
# Extract and emit a css file
extract_css: false
extract_css: true
static_assets_extensions:
- .jpg