2020-10-17 18:06:57 +00:00
|
|
|
const { merge } = require('webpack-merge')
|
2020-10-12 15:29:36 +00:00
|
|
|
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
|
|
|
|
2020-10-17 18:06:57 +00:00
|
|
|
const config = {
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
2020-10-22 11:53:40 +00:00
|
|
|
test: /\.(png|jpg|gif)$/,
|
|
|
|
loader: 'file-loader',
|
|
|
|
options: {
|
|
|
|
name: '[name].[ext]?[hash]',
|
|
|
|
},
|
2020-10-17 18:06:57 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|