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: [
|
|
|
|
{
|
|
|
|
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',
|
|
|
|
entry: './src/index.ts',
|
2022-10-13 00:18:18 -04:00
|
|
|
devServer: {
|
|
|
|
allowedHosts: 'all',
|
|
|
|
proxy: {
|
|
|
|
'/calendar': {
|
|
|
|
target: 'https://calendar.google.com',
|
|
|
|
changeOrigin: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
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'),
|
|
|
|
filename: 'bundle.js',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
...common,
|
|
|
|
name: 'wall-display',
|
|
|
|
entry: './src/wall-display.ts',
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.m?js$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: ['babel-loader', 'ts-loader'],
|
|
|
|
},
|
|
|
|
...common.module.rules,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
filename: 'bundle-wall-display.js',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|