2021-03-20 19:08:15 +00:00
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: './src/index.js',
|
|
|
|
|
2021-03-28 21:34:55 +00:00
|
|
|
|
2021-03-20 19:08:15 +00:00
|
|
|
output: {
|
|
|
|
filename: 'bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
// clean: true,
|
|
|
|
},
|
2021-03-28 21:34:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
entry: {
|
2021-03-28 23:25:57 +00:00
|
|
|
redux: './src/redux.js',
|
2021-03-28 21:34:55 +00:00
|
|
|
index: './src/index.js',
|
|
|
|
renderer: './src/Renderer.js',
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
filename: '[name].bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-20 19:08:15 +00:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.s[ac]ss$/i,
|
|
|
|
use: [
|
|
|
|
// Creates `style` nodes from JS strings
|
|
|
|
"style-loader",
|
|
|
|
// Translates CSS into CommonJS
|
|
|
|
"css-loader",
|
|
|
|
// Compiles Sass to CSS
|
|
|
|
"sass-loader",
|
|
|
|
],
|
|
|
|
},
|
2021-03-26 09:25:28 +00:00
|
|
|
{
|
|
|
|
test: /\.(js|jsx)$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
2021-03-26 20:40:40 +00:00
|
|
|
presets: ["@babel/preset-react"],
|
2021-03-26 09:25:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2021-03-20 19:08:15 +00:00
|
|
|
],
|
|
|
|
},
|
2021-03-26 09:25:28 +00:00
|
|
|
resolve: {
|
|
|
|
extensions: ['.js', '.jsx', '*']
|
2021-03-26 20:40:40 +00:00
|
|
|
},
|
2021-03-20 19:08:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|