2022-03-16 11:27:11 +01:00
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
|
|
const path = require('path');
|
|
|
|
const ESLintPlugin = require('eslint-webpack-plugin');
|
2020-04-26 11:36:41 +02:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: {
|
|
|
|
admin: [
|
|
|
|
path.join(__dirname, 'ts', 'admin.ts'),
|
|
|
|
],
|
|
|
|
filelist: [
|
|
|
|
path.join(__dirname, 'ts', 'filelist.ts'),
|
|
|
|
],
|
|
|
|
manager: [
|
|
|
|
path.join(__dirname, 'ts', 'Manager', 'index.tsx'),
|
|
|
|
],
|
2020-08-27 17:21:34 +02:00
|
|
|
restrictions: [
|
|
|
|
path.join(__dirname, 'ts', 'Restrictions', 'index.tsx'),
|
|
|
|
],
|
2020-06-04 18:56:55 +02:00
|
|
|
join: [
|
|
|
|
path.join(__dirname, 'ts', 'join.ts'),
|
2020-08-29 14:37:50 +02:00
|
|
|
],
|
|
|
|
waiting: [
|
|
|
|
path.join(__dirname, 'ts', 'waiting.ts'),
|
2022-03-16 11:27:11 +01:00
|
|
|
],
|
2020-04-26 11:36:41 +02:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, './js'),
|
|
|
|
publicPath: '/js/',
|
|
|
|
filename: '[name].js',
|
|
|
|
chunkFilename: 'chunks/[name]-[hash].js',
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
babelrc: false,
|
|
|
|
plugins: ['react-hot-loader/babel'],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'ts-loader',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: ['style-loader', 'css-loader'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: ['style-loader', 'css-loader', 'sass-loader'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
loader: 'babel-loader',
|
|
|
|
exclude: /node_modules/,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(png|jpg|gif|svg)$/,
|
2022-03-17 14:20:08 +01:00
|
|
|
type: 'asset',
|
|
|
|
generator: {
|
|
|
|
filename: 'static/[name][ext]?[hash]',
|
2020-04-26 11:36:41 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
plugins: [
|
2022-03-16 11:27:11 +01:00
|
|
|
new ESLintPlugin(),
|
2020-04-26 11:36:41 +02:00
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.tsx', '.ts', '.js', '.scss'],
|
|
|
|
symlinks: false,
|
|
|
|
},
|
2022-03-16 11:27:11 +01:00
|
|
|
};
|