2023-04-20 13:10:16 +00:00
|
|
|
//webpack.config.js
|
2023-05-09 14:55:29 +00:00
|
|
|
const path = require('path');
|
2023-04-20 13:10:16 +00:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: {
|
2023-05-09 14:55:29 +00:00
|
|
|
main: './src/main.ts',
|
2023-04-20 13:10:16 +00:00
|
|
|
},
|
|
|
|
output: {
|
2023-05-09 14:55:29 +00:00
|
|
|
path: path.resolve(__dirname, './app/static'),
|
|
|
|
filename: 'js/main.js', // <--- Will be compiled to this single file
|
2023-04-20 13:10:16 +00:00
|
|
|
},
|
|
|
|
resolve: {
|
2023-05-09 14:55:29 +00:00
|
|
|
extensions: ['.ts', '.tsx', '.js'],
|
2023-04-20 13:10:16 +00:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
2023-05-09 14:55:29 +00:00
|
|
|
loader: 'ts-loader',
|
2023-04-20 13:10:16 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|