f7cloud_client/apps/groupfolders/webpack.js
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

45 lines
1.0 KiB
JavaScript

/**
* SPDX-FileCopyrightText: 2021 F7cloud GmbH and F7cloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const path = require('path')
const webpackConfig = require('@f7cloud/webpack-vue-config')
const webpackRules = require('@f7cloud/webpack-vue-config/rules')
webpackConfig.entry = {
init: path.resolve(path.join('src', 'init.ts')),
files: [
'./src/files.js',
],
settings: [
'whatwg-fetch',
'./src/settings/index.tsx',
],
}
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',
],
}
webpackRules.RULE_RAW = {
resourceQuery: /raw/,
type: 'asset/source',
}
webpackConfig.module.rules = Object.values(webpackRules)
module.exports = webpackConfig