58 lines
1.1 KiB
JavaScript
58 lines
1.1 KiB
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
entry: './src/index.ts',
|
|
devServer: {
|
|
proxy: {
|
|
'/calendar': {
|
|
target: 'https://calendar.google.com',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
devtool: "eval-cheap-source-map",
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.m?js$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader',
|
|
},
|
|
{
|
|
test: /\.tsx?$/,
|
|
exclude: /node_modules/,
|
|
use: [
|
|
'babel-loader',
|
|
{
|
|
loader: 'ts-loader',
|
|
options: {
|
|
appendTsSuffixTo: [/\.vue$/],
|
|
},
|
|
}
|
|
],
|
|
},
|
|
{
|
|
test: /\.css$/i,
|
|
use: ["style-loader", "css-loader"],
|
|
},
|
|
{
|
|
test: /\/index.html$/i,
|
|
use: {
|
|
loader: "file-loader",
|
|
options: {
|
|
name: '[name].[ext]',
|
|
}
|
|
},
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: 'bundle.js',
|
|
},
|
|
};
|