blob: 19273c73ef06d369b718c3b753a1459a7c7cad7e (
plain)
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
|
// SPDX-FileCopyrightText: Julius Härtl <jus@bitgrid.net>
// SPDX-License-Identifier: AGPL-3.0-or-later
const webpackConfig = require('@nextcloud/webpack-vue-config')
const webpackRules = require('@nextcloud/webpack-vue-config/rules')
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
webpackConfig.entry = {
settings: [
'whatwg-fetch',
'./src/settings/index.tsx'
],
files: [
'./src/files.js'
]
}
webpackConfig.resolve.extensions = [...webpackConfig.resolve.extensions, '.jsx', '.ts', '.tsx']
webpackConfig.plugins.push(new CleanWebpackPlugin())
webpackRules.RULE_TSX = {
test: /\.tsx?$/,
use: [
{
loader: 'babel-loader',
options: {
babelrc: false,
plugins: ['react-hot-loader/babel'],
},
},
'ts-loader'
]
}
webpackConfig.module.rules = Object.values(webpackRules)
module.exports = webpackConfig
|