RU
Size: a a a
RU
RU
Ж
RU
DB
A
С
С
A
С
A
ZH
HH
RU
GB
HH
ОА
ОА
CS
const path = require('path')
const HTMLWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "/dist"),
filename: '[name].[contenthash].js'
},
module: {
rules: [
{
test: '/\.js$/',
exclude: '/node_modules/',
use: {
loader: 'babel-loader'
}
},
{
test: '/\.css$/',
use: ['style-loader', 'css-loader']
}
]
},
plugins: [
new HTMLWebpackPlugin({ template: './src/index.html' })
]
}
{
"name": "react-setup",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack --mode production",
"start": "webpack --mode development --watch"
},
"keywords": [],
"author": "Movsesyan David <coldseattle@mail.ru> (http://github.com/coldSeattle)",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.1",
"babel-loader": "^8.1.0",
"css-loader": "^5.0.0",
"html-webpack-plugin": "^4.5.0",
"style-loader": "^2.0.0",
"webpack": "^5.3.2",
"webpack-cli": "^4.1.0"
},
"dependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}