Skip to content

Commit

Permalink
limit sass options to those relevant in this context
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Mar 19, 2020
1 parent 35ea2b5 commit cb2e9db
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions x-pack/legacy/plugins/canvas/shareable_runtime/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,9 @@ module.exports = {
)};\n`;
},
webpackImporter: false,
sassOptions(loaderContext) {
const darkMode = loaderContext.resourceQuery === '?dark';

return {
outputStyle: 'nested',
includePaths: [path.resolve(KIBANA_ROOT, 'node_modules')],
importer: url => {
if (darkMode && url.includes('eui_colors_light')) {
return { file: url.replace('eui_colors_light', 'eui_colors_dark') };
}

return { file: url };
},
};
sassOptions: {
outputStyle: 'nested',
includePaths: [path.resolve(KIBANA_ROOT, 'node_modules')],
},
},
},
Expand Down

0 comments on commit cb2e9db

Please sign in to comment.