typescript и handlebars

This commit is contained in:
grinikita
2025-04-01 22:05:38 +03:00
parent 1597b52310
commit e53ae4858d
16 changed files with 591 additions and 596 deletions
+14 -3
View File
@@ -3,16 +3,27 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
entry: './src/index.js',
entry: './src/index.ts',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
clean: true
},
module: {},
resolve: {
extensions: ['.js', '.ts']
},
module: {
rules: [
{ test: /\.(ts|tsx)$/, loader: "ts-loader" },
{
test: /\.hbs$/,
loader: 'handlebars-loader',
},
]
},
plugins: [
new HtmlWebpackPlugin({
template: "./src/index.html"
template: "./src/index.hbs"
}),
new CopyPlugin({
patterns: [