-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathwebpack.common.js
More file actions
44 lines (39 loc) · 1.21 KB
/
webpack.common.js
File metadata and controls
44 lines (39 loc) · 1.21 KB
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
36
37
38
39
40
41
42
43
44
/**
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
const path = require('path')
const webpackConfig = require('@nextcloud/webpack-vue-config')
const CopyPlugin = require('copy-webpack-plugin')
webpackConfig.plugins.push(new CopyPlugin({
patterns: [
{ from: 'node_modules/twemoji/2/svg/', to: '../img/twemoji' },
],
}))
webpackConfig.entry = {
social: path.join(__dirname, 'src', 'main.js'),
ostatus: path.join(__dirname, 'src', 'ostatus.js'),
profilePage: path.join(__dirname, 'src', 'profile.js'),
dashboard: path.join(__dirname, 'src', 'dashboard.js'),
oauth: path.join(__dirname, 'src', 'oauth.js'),
}
webpackConfig.optimization.concatenateModules = false
webpackConfig.module.rules.unshift({
test: /\.mjs$/,
type: 'javascript/auto',
resolve: {
fullySpecified: false,
},
})
webpackConfig.module.rules.unshift({
test: /node_modules\/(?:axios|webdav|@vue\/devtools-shared)\/.*\.js$/,
resolve: {
fullySpecified: false,
},
})
webpackConfig.resolve.extensions = ['.*', '.ts', '.js', '.vue', '.json']
webpackConfig.resolve.fallback = {
...webpackConfig.resolve.fallback,
buffer: require.resolve('buffer/'),
}
module.exports = webpackConfig