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',
|
|
|
|
devServer: {
|
|
|
|
proxy: {
|
|
|
|
'/calendar': {
|
|
|
|
target: 'https://calendar.google.com',
|
|
|
|
changeOrigin: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
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,
|
2021-11-17 15:57:47 -05:00
|
|
|
use: {
|
2022-03-10 23:38:38 -05:00
|
|
|
loader: 'file-loader',
|
2021-11-17 15:57:47 -05:00
|
|
|
options: {
|
|
|
|
name: '[name].[ext]',
|
2022-03-10 23:38:38 -05:00
|
|
|
},
|
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',
|
|
|
|
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',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|