What to consider when creating the config to React SPA app?

Hello!
There is a task on research - you need to prepare the base to create a SPA Reacte. There will be many forms, DnD. The relationship with Beck using RESTfull services.
Is that webpack looks like this :

const HtmlWebPackPlugin = require("html-webpack-plugin");
const path = require("path")
const htmlWebpackPlugin = new HtmlWebPackPlugin({
 template: "./public/index.html",
 filename: "./index.html"
});


module.exports = {
 module: {
 rules: [
{
 test: /\.(jpg|png|gif|svg|pdf|ico)$/,
 use: [
{
 loader: 'file-loader',
 options: {
 name: '[path][name] [hash:8].[ext]'
},
},
]
},
 // {
 // enforce: "pre",
 // test: /\.js$/,
 // exclude: /node_modules/,
 // loader: "eslint-loader",
 // options: {
 // eslintPath: path.join(__dirname, "/.eslintrc"),
 // }
 // },
{
 test: /\.js$/,
 exclude: /node_modules/,
 loader: "babel-loader",
},
{
 test: /\.html$/,
 use: [
{
 loader: "html-loader"
}
]
},
{
 test: /\.scss$/,
 use: [
{
 loader: "style-loader"
},
{
 loader: "css-loader",
 options: {
 modules: true
 importLoaders: 1,
 localIdentName: "[name]_[local]_[hash:base64]",
 sourceMap: true,
 minimize: true
}
},
{
 loader: "sass-loader"
}
]
}
]
},
 plugins: [htmlWebpackPlugin]
};


What should you consider? You need to add?
Thank you!
June 3rd 19 at 19:29
0 answer

Find more questions by tags ReactWebpack