-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathwebpack.common.js
More file actions
54 lines (47 loc) · 1.19 KB
/
webpack.common.js
File metadata and controls
54 lines (47 loc) · 1.19 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
45
46
47
48
49
50
51
52
53
54
/* eslint-disable @typescript-eslint/no-var-requires */
process.env.npm_package_name = 'bbb';
const path = require('path');
const ESLintPlugin = require('eslint-webpack-plugin');
const webpackConfig = require('@nextcloud/webpack-vue-config')
const webpackRules = require('@nextcloud/webpack-vue-config/rules')
webpackRules.RULE_TSX = {
test: /\.tsx?$/,
use: [
{
loader: 'babel-loader',
options: {
babelrc: false,
},
},
'ts-loader',
],
};
webpackRules.RULE_RAW = {
test: /\.svg$/,
resourceQuery: /raw/,
type: 'asset/source'
};
webpackConfig.entry = {
admin: [
path.join(__dirname, 'ts', 'admin.ts'),
],
filelist: [
path.join(__dirname, 'ts', 'filelist.ts'),
],
manager: [
path.join(__dirname, 'ts', 'Manager', 'index.tsx'),
],
restrictions: [
path.join(__dirname, 'ts', 'Restrictions', 'index.tsx'),
],
join: [
path.join(__dirname, 'ts', 'join.ts'),
],
waiting: [
path.join(__dirname, 'ts', 'waiting.ts'),
],
};
webpackConfig.module.rules = Object.values(webpackRules);
webpackConfig.plugins.push(new ESLintPlugin());
webpackConfig.resolve.extensions = [...webpackConfig.resolve.extensions, '.jsx', '.ts', '.tsx'];
module.exports = webpackConfig