React инициализация

This commit is contained in:
grinikita
2025-04-14 21:14:49 +03:00
parent 520ad38f8d
commit 9550031481
15 changed files with 369 additions and 242 deletions
+3 -16
View File
@@ -3,14 +3,14 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
entry: './src/index.ts',
entry: './src/index.tsx',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
clean: true
},
resolve: {
extensions: ['.js', '.ts']
extensions: ['.js', '.ts', '.jsx', '.tsx']
},
module: {
rules: [
@@ -30,21 +30,8 @@ module.exports = {
},
plugins: [
new HtmlWebpackPlugin({
template: "./src/index.hbs",
template: "./src/index.html",
filename: "index.html"
}),
new HtmlWebpackPlugin({
template: "./src/creators.hbs",
filename: "creators.html"
}),
new HtmlWebpackPlugin({
template: "./src/discover.hbs",
filename: "discover.html"
}),
new CopyPlugin({
patterns: [
{from: "./src/images", to: "images"},
],
})
]
};