nextcloud-app-radio/webpack.js
2020-10-22 13:53:40 +02:00

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