24 lines
553 B
JavaScript
24 lines
553 B
JavaScript
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
|