const { merge } = require('webpack-merge') const webpackConfig = require('@nextcloud/webpack-vue-config') const config = { module: { rules: [ { test: /\.(png|jpg|gif)$/, loader: 'file-loader', options: { name: '[name].[ext]?[hash]', }, }, ], }, } const mergedConfigs = merge(config, webpackConfig) // Remove duplicate rules by the `test` key mergedConfigs.module.rules = mergedConfigs.module.rules.filter((v, i, a) => a.findIndex(t => (t.test.toString() === v.test.toString())) === i) module.exports = mergedConfigs