nextcloud-app-radio/webpack.js

38 lines
817 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: /\.css$/,
use: ['vue-style-loader', 'css-loader', 'postcss-loader'],
},
{
test: /\.scss$/,
use: [
'vue-style-loader',
'css-loader',
'postcss-loader',
'sass-loader',
],
},
2020-11-19 09:01:55 +00:00
{
test: /\.vue$/,
use: ['vue-loader'],
2020-11-19 09:01:55 +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