webpack-conditional-loader
webpack-conditional-loader copied to clipboard
pass context to truthy blocks
this needed for passing arguments through webpack query, for example you have 10 targets with different languages, this will let to pass lang as a query to every build // #if this.query.lang === 'En' --- do something --- // #endif
this will let to pass lang as a query to every build
@MoreBlood, looks interesting and possibly helpful to what I'm working on. Could you give an example of how the langs would be passed to each build?
@njgraf512
{
loader: 'webpack-conditional-loader',
query: {
aspectRatio: build.width / build.height,
resizeCode: helpers.getSizeCodeName(build.width, build.height),
language: build.language,
localizationTool: true,
},