forked from nextcloud/notifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.js
27 lines (22 loc) · 858 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
/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
const webpackConfig = require('@nextcloud/webpack-vue-config')
const webpackRules = require('@nextcloud/webpack-vue-config/rules')
const path = require('path')
const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except')
// Edit JS rule
webpackRules.RULE_JS.exclude = BabelLoaderExcludeNodeModulesExcept([
'@nextcloud/vue-richtext',
'@nextcloud/event-bus',
'semver',
])
// Replaces rules array
webpackConfig.module.rules = Object.values(webpackRules)
webpackConfig.entry = {
main: path.resolve(path.join('src', 'main.js')),
settings: path.resolve(path.join('src', 'settings.js')),
'admin-settings': path.resolve(path.join('src', 'adminSettings.js')),
}
module.exports = webpackConfig