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: [
|
|
|
|
{
|
|
|
|
test: /\.(png|jpg|gif)$/, loader: 'file-loader?name=./images/[name].[ext]',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|