forked from csoc-de/Shifts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.js
35 lines (31 loc) · 786 Bytes
/
webpack.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const webpackConfig = require('@nextcloud/webpack-vue-config')
const { merge } = require('webpack-merge')
const path = require('path')
const config = {
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(jpe?g|png|gif|svg|eot|woff|ttf|woff2)$/,
loader: 'file-loader',
},
],
},
entry: {
settings: path.resolve(path.join('settings', 'settings.js')),
},
}
const mergedConfigs = merge(config, webpackConfig)
mergedConfigs.module.rules = mergedConfigs.module.rules.filter((v, i, a) => a.findIndex(t => (t.test.toString() === v.test.toString())) === i)
module.exports = mergedConfigs
module.exports.watchOptions = {
aggregateTimeout: 200,
poll: 750,
}