38 lines
1.0 KiB
JavaScript
38 lines
1.0 KiB
JavaScript
const path = require('path');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
entry: './src/index.tsx',
|
|
output: {
|
|
filename: 'main.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(ts|tsx)$/,
|
|
loader: 'babel-loader',
|
|
exclude: /node_modules/,
|
|
}
|
|
]
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
alias: {
|
|
'@keact': path.resolve(__dirname, './src/keact'),
|
|
}
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
template: "./src/index.html"
|
|
})
|
|
],
|
|
devServer: {
|
|
port: 3000, // You can run your app at http://localhost:3000
|
|
hot: false, // "Hot Module Replacement" (Updates without full reload)
|
|
static: {
|
|
directory: path.join(__dirname, 'public'), // If you have static assets (images)
|
|
},
|
|
},
|
|
}; |