javascript - Override path resolve for css bundling in webpack -


based on https://github.com/davezuko/react-redux-starter-kit repo uses webpack, i'm trying implement build process overwrites *.scss files of standard build files folder.

/src     /styles         core.scss         _colors.scss         _common.scss     /custom-styles         /skin-1             /styles                 _colors.scss 

core.scss in example @import 'colors' (as seen below) loads /src/styles/_colors.scss file.

core.scss:

:global {     @import 'colors'; } 

i want configure webpack first check /custom-styles/skin-1 folder file, , if no file found @ custom location, fallback standard path resolve.

so override active:

  • @import 'colors' resolve file /src/custom-styles/skin-1/styles/_colors.scss
  • @import 'common' resolve file /src/styles/_common.scss first checked if /src/custom-styles/skin-1/styles/_common.scss available

there webpack plugin called path-override-webpack-plugin can *.js files (https://github.com/jamiehill/path-override-webpack-plugin). unfortunately not override paths used @import inside *.scss files.

how behavior achievable?


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -