- components
- Header
- partners
- vodafone
- Header.js
- Header.scss
- vodafone
- Header.js
- Header.scss
- partners
- Header
When trying to load the JavaScript file require('components/Header/Header.js')
- If
process.env.PARTNER
isnothing
it will loadcomponents/Header/Header.js
- If
process.env.PARTNER
isvodafone
it will loadcomponents/partners/vodafone/Header/Header.js
When trying to load the SASS file require('components/Header/Header.scss')
- If
process.env.PARTNER
isnothing
it will loadcomponents/Header/Header.scss
- If
process.env.PARTNER
isvodafone
it will loadcomponents/partners/vodafone/Header/Header.scss
Usage:
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loaders: [
'babel?' + JSON.stringify(babelLoaderQuery),
'eslint-loader',
'partner-loader'
]
},
{ test: /\.scss$/, loader: 'style!css?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!autoprefixer?browsers=last 2 version!sass?outputStyle=expanded&sourceMap!partner-loader' },
]