/
Saypi
/
test-task-only
Обзор
Документация
Войти
/
Saypi
/
test-task-only
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
webpack.config.js
43 строки
865 B
Saipykurbanov
first_commit
01 авг 2025, 17:02
01 авг 2025, 17:02
68a99b1
Код
Авторство
О чём код?
// webpack.config.js import path from 'path'; import { fileURLToPath } from 'url'; import HtmlWebpackPlugin from 'html-webpack-plugin'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); export default { mode: 'development', entry: './src/main.tsx', output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js', clean: true, }, resolve: { extensions: ['.ts', '.tsx', '.js'], }, module: { rules: [ { test: /\.(ts|tsx|js|jsx)$/, exclude: /node_modules/, use: 'babel-loader', }, { test: /\.css$/i, use: ['style-loader', 'css-loader'], }, ] }, plugins: [ new HtmlWebpackPlugin({ template: './public/index.html' }) ], devServer: { static: './dist', port: 3000, hot: true } };