nextcloud-app-radio/webpack.js
2020-10-17 20:06:57 +02:00

20 lines
520 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?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