2021-04-05 14:08:32 +03:00
|
|
|
const path = require('path');
|
|
|
|
const common = require('./webpack.common');
|
|
|
|
const merge = require('webpack-merge');
|
|
|
|
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
2021-04-02 18:05:06 +03:00
|
|
|
|
|
|
|
module.exports = merge(common, {
|
2021-04-05 14:08:32 +03:00
|
|
|
mode: 'development',
|
2021-04-02 18:05:06 +03:00
|
|
|
output: {
|
2021-04-05 14:08:32 +03:00
|
|
|
filename: '[name].bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
2021-04-02 18:05:06 +03:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({
|
2021-04-05 14:56:58 +03:00
|
|
|
filename: 'register/index.html',
|
2021-04-06 19:04:11 +03:00
|
|
|
template: path.resolve(__dirname, 'output/register/', 'index.html'),
|
2021-04-05 14:08:32 +03:00
|
|
|
}),
|
2021-04-02 18:05:06 +03:00
|
|
|
|
2021-04-05 14:08:32 +03:00
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
filename: 'panel/index.html',
|
2021-04-06 19:04:11 +03:00
|
|
|
template: path.resolve(__dirname, 'output/panel/', 'index.html'),
|
|
|
|
}),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: path.resolve(__dirname, 'output/', 'index.html'),
|
2021-04-05 14:08:32 +03:00
|
|
|
}),
|
2021-04-02 18:05:06 +03:00
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: [
|
2021-04-05 14:08:32 +03:00
|
|
|
'style-loader', //3. Inject styles into DOM
|
|
|
|
'css-loader', //2. Turns css into commonjs
|
|
|
|
'sass-loader', //1. Turns sass into css
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-04-02 18:05:06 +03:00
|
|
|
});
|