forked from CodesVault/kathamo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.config.js
51 lines (47 loc) · 1.25 KB
/
dev.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const WebpackBuildNotifierPlugin = require("webpack-build-notifier");
const config = {
mode: 'development',
module: {
rules: [
{
test: /\.(sa|sc|c)ss$/,
use: [
MiniCssExtractPlugin.loader,
"css-loader",
"postcss-loader",
"sass-loader",
],
},
],
}
}
const admin = Object.assign( {}, config, {
entry: `${__dirname}/assets/dev/admin/js/admin.js`,
output: {
path: `${__dirname}/assets/admin/js`,
filename: 'admin.js',
},
plugins: [
new MiniCssExtractPlugin({
filename: `../css/admin.css`,
}),
new WebpackBuildNotifierPlugin({
title: "Howdy",
suppressSuccess: true,
}),
],
} );
const public = Object.assign( {}, config, {
entry: `${__dirname}/assets/dev/public/js/main.js`,
output: {
path: `${__dirname}/assets/public/js`,
filename: 'public.js',
},
plugins: [
new MiniCssExtractPlugin({
filename: `../css/public.css`,
}),
],
} );
module.exports = [ admin, public ];