mCaptcha/frontend/webpack.dev.js

39 lines
1,002 B
JavaScript
Raw Normal View History

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');
module.exports = merge(common, {
2021-04-05 14:08:32 +03:00
mode: 'development',
output: {
2021-04-05 14:08:32 +03:00
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
},
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-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
}),
],
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
],
},
],
},
});