burguillos.info/webpack.config.js

39 lines
947 B
JavaScript
Raw Permalink Normal View History

2023-05-07 03:09:36 +02:00
const path = require('path')
module.exports = {
2023-08-21 00:58:11 +02:00
entry: './js-src/index.js',
2023-05-07 03:09:36 +02:00
mode: 'development',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'public/js/')
},
resolve: {
2023-11-28 23:48:34 +01:00
extensions: ['.js', '.jsx', '.ts', '.tsx'],
2023-05-07 03:09:36 +02:00
roots: [
path.resolve(__dirname, 'js-src/')
],
alias: {
'@burguillosinfo': path.resolve(__dirname, 'js-src')
}
},
module: {
rules: [
2023-11-28 23:48:34 +01:00
{
test: /\.(?:tsx|ts)?$/,
use: 'ts-loader',
exclude: /node_modules/
},
2023-05-07 03:09:36 +02:00
{
test: /\.jpe?g|png$/,
exclude: /node_modules/,
use: ['url-loader', 'file-loader']
2023-11-28 23:48:34 +01:00
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
loader: 'babel-loader'
2023-05-07 03:09:36 +02:00
}
]
}
}