neutrino-middleware-xml
is a Neutrino Middleware for the Webpack XML Template Plugin.
npm install --save-dev neutrino-middleware-xml
module.exports = {
use: [
'neutrino-middleware-xml',
{
files: [
{
template: path.join(__dirname, 'xml-template.ejs'),
filename: 'path/to/result.xml',
data: {
foo: 'bar'
}
}
]
}
]
}
- Uses the Webpack XML Template Plugin to generate XML files based on a template and passed data.
- Options passed to this middleware are passed directly to the plugin. See the plugin's documentation for more details.