const path = require('path'); const common = { mode: 'development', module: { rules: [ { test: /\.css$/i, use: ['style-loader', 'css-loader'], }, { test: /\.html$/i, use: { loader: 'file-loader', options: { name: '[name].[ext]', }, }, }, ], }, devtool: 'source-map', resolve: { extensions: ['.tsx', '.ts', '.js'], }, }; module.exports = [ { ...common, name: 'default', entry: './src/index.ts', devServer: { allowedHosts: 'all', proxy: { '/calendar': { target: 'https://calendar.google.com', changeOrigin: true, }, }, }, 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', }, }, ];