nextcloud-app-radio/webpack.js

25 lines
587 B
JavaScript
Raw Normal View History

2020-11-19 09:01:55 +00:00
const { merge } = require('webpack-merge')
const path = require('path')
2020-10-12 15:29:36 +00:00
const webpackConfig = require('@nextcloud/webpack-vue-config')
2020-11-19 09:01:55 +00:00
const config = {
entry: {
dashboard: path.join(__dirname, 'src', 'dashboard.js'),
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
},
],
},
}
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