npm install lazabogdan/webpack-query-string
Pass in the object to convert to a query string as the first parameter and any other optional qs options. Returns a query string.
function(fromObject, [options]) -> String
var qs = require('webpack-query-string');
// webpack.config.js
loaders: [
{
test: /\.html$/,
loader: 'html?' + qs({
attrs: [
'img:src',
'some-element:src',
'some-other-element:src'
]
})
}
]
// will return
// attrs[]=img:src&attrs[]=some-element:src&attrs[]=some-other-element:src