2022-09-20 17:39:49 +00:00
|
|
|
import path from 'path';
|
|
|
|
import { Configuration } from 'webpack';
|
2022-04-21 14:52:54 +00:00
|
|
|
|
|
|
|
const config: Configuration = {
|
2022-09-20 17:39:49 +00:00
|
|
|
entry: './src/index.js',
|
2022-04-21 14:52:54 +00:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.(ts|js)x?$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: {
|
2022-09-20 17:39:49 +00:00
|
|
|
loader: 'babel-loader',
|
2022-04-21 14:52:54 +00:00
|
|
|
options: {
|
2022-09-20 17:39:49 +00:00
|
|
|
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
|
2022-04-21 14:52:54 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
resolve: {
|
2022-09-20 17:39:49 +00:00
|
|
|
extensions: ['.tsx', '.ts', '.jsx', '.js'],
|
2022-04-21 14:52:54 +00:00
|
|
|
},
|
|
|
|
output: {
|
2022-09-20 17:39:49 +00:00
|
|
|
path: path.resolve(__dirname, 'static/frontend'),
|
|
|
|
filename: 'main.js',
|
2022-04-21 14:52:54 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|