2021-11-15 16:43:54 -05:00
|
|
|
const path = require('path');
|
|
|
|
|
2022-10-12 02:10:52 -04:00
|
|
|
const common = {
|
2021-11-15 16:43:54 -05:00
|
|
|
mode: 'development',
|
|
|
|
module: {
|
|
|
|
rules: [
|
2022-12-10 12:45:32 -05:00
|
|
|
{
|
|
|
|
test: /\.(png|jpg|gif|svg|eot|ttf|woff)$/,
|
|
|
|
type: 'asset/resource',
|
|
|
|
},
|
2021-11-15 16:43:54 -05:00
|
|
|
{
|
|
|
|
test: /\.css$/i,
|
2022-03-10 23:38:38 -05:00
|
|
|
use: ['style-loader', 'css-loader'],
|
2021-11-17 15:57:47 -05:00
|
|
|
},
|
|
|
|
{
|
2022-10-12 02:10:52 -04:00
|
|
|
test: /\.html$/i,
|
2022-12-10 12:15:36 -05:00
|
|
|
type: 'asset/resource',
|
|
|
|
generator: {
|
|
|
|
filename: '[name][ext]',
|
2021-11-17 15:57:47 -05:00
|
|
|
},
|
|
|
|
},
|
2021-11-15 16:43:54 -05:00
|
|
|
],
|
|
|
|
},
|
2022-10-12 02:10:52 -04:00
|
|
|
devtool: 'source-map',
|
2021-11-15 16:43:54 -05:00
|
|
|
resolve: {
|
|
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
|
|
},
|
|
|
|
};
|
2022-10-12 02:10:52 -04:00
|
|
|
|
|
|
|
module.exports = [
|
|
|
|
{
|
|
|
|
...common,
|
|
|
|
name: 'default',
|
2023-08-28 20:38:49 -04:00
|
|
|
entry: {
|
|
|
|
index: './src/index.ts',
|
|
|
|
'wall-display': './src/wall-display.ts',
|
|
|
|
},
|
2022-10-13 00:18:18 -04:00
|
|
|
devServer: {
|
|
|
|
allowedHosts: 'all',
|
2024-03-22 13:28:42 -04:00
|
|
|
proxy: [
|
|
|
|
{
|
|
|
|
context: ['/calendar'],
|
2022-10-13 00:18:18 -04:00
|
|
|
target: 'https://calendar.google.com',
|
|
|
|
changeOrigin: true,
|
|
|
|
},
|
2024-03-22 13:28:42 -04:00
|
|
|
{
|
|
|
|
context: ['/ipad.png'],
|
2023-08-28 20:38:49 -04:00
|
|
|
target: 'http://localhost:1234',
|
|
|
|
},
|
2024-03-22 13:28:42 -04:00
|
|
|
],
|
2022-10-13 00:18:18 -04:00
|
|
|
},
|
2022-10-12 02:10:52 -04:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: ['ts-loader'],
|
|
|
|
},
|
|
|
|
...common.module.rules,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
2023-08-28 20:38:49 -04:00
|
|
|
filename: 'bundle-[name].js',
|
2022-10-12 02:10:52 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
...common,
|
2023-08-28 20:38:49 -04:00
|
|
|
name: 'ipad',
|
|
|
|
entry: ['./src/ipad.ts'],
|
2022-10-12 02:10:52 -04:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.m?js$/,
|
2023-08-28 20:38:49 -04:00
|
|
|
include: /node_modules\/@fullcalendar/,
|
2022-10-12 02:10:52 -04:00
|
|
|
loader: 'babel-loader',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: ['babel-loader', 'ts-loader'],
|
|
|
|
},
|
|
|
|
...common.module.rules,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
2023-08-28 20:38:49 -04:00
|
|
|
filename: 'bundle-ipad.js',
|
2022-10-12 02:10:52 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|