32 lines
729 B
JavaScript
32 lines
729 B
JavaScript
|
const path = require('path');
|
||
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||
|
|
||
|
module.exports = {
|
||
|
mode: process.env.WEBPACK_MODE || "production",
|
||
|
entry: './src/main.js',
|
||
|
output: {
|
||
|
path: path.resolve(__dirname, 'dist'),
|
||
|
filename: 'bundle.js',
|
||
|
},
|
||
|
plugins: [new MiniCssExtractPlugin(), new HtmlWebpackPlugin({ title: "VaultUI" })],
|
||
|
devServer: {
|
||
|
open: 'microsoft-edge-dev',
|
||
|
},
|
||
|
resolve: {
|
||
|
modules: ['node_modules'],
|
||
|
},
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.(sa|sc|c)ss$/,
|
||
|
use: [
|
||
|
MiniCssExtractPlugin.loader,
|
||
|
"css-loader",
|
||
|
"sass-loader"
|
||
|
],
|
||
|
},
|
||
|
|
||
|
],
|
||
|
},
|
||
|
};
|