diff --git a/rollup/config.js b/rollup/config.js index 5f0b2bc60a..e4dbdc6053 100644 --- a/rollup/config.js +++ b/rollup/config.js @@ -109,7 +109,7 @@ function get_rollup_options_for_js(output_file, input_files) { function get_rollup_options_for_css(output_file, input_files) { const output_path = path.resolve(assets_path, output_file); - const minimize_css = output_path.startsWith('css/') && production; + const starts_with_css = output_file.startsWith('css/'); const plugins = [ // enables array of inputs @@ -125,15 +125,24 @@ function get_rollup_options_for_css(output_file, input_files) { path.resolve(get_public_path('frappe'), 'less') ] }], - ['sass', get_options_for_scss()] + ['sass', { + ...get_options_for_scss(), + outFile: output_path, + sourceMapContents: true + }] ], include: [ path.resolve(bench_path, '**/*.less'), path.resolve(bench_path, '**/*.scss'), path.resolve(bench_path, '**/*.css') ], +<<<<<<< Updated upstream minimize: minimize_css, sourceMap: output_file.startsWith('css/') && !production +======= + minimize: starts_with_css && production, + sourceMap: starts_with_css && !production +>>>>>>> Stashed changes }) ];