forked from statikbe/craft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfavicons.config.site2.js
48 lines (44 loc) · 1.31 KB
/
favicons.config.site2.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
const path = require('path');
const tailwindConf = require('./tailwind.config.site2.js');
const dotenv = require('dotenv').config({ path: __dirname + '/.env' });
// Plugins
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const PATHS = {
public: path.join(__dirname, 'public'),
templates: path.join(__dirname, 'templates/_site2'),
favicon: path.join(__dirname, 'tailoff', '/img/site2'),
ejs: path.join(__dirname, 'tailoff', '/ejs'),
};
module.exports = (env) => {
return {
mode: 'production',
entry: {},
output: {
publicPath: '/',
path: `${PATHS.public}`,
},
plugins: [
new HtmlWebpackPlugin({
filename: `${PATHS.templates}/_snippet/_global/_favicon.twig`,
template: `${PATHS.ejs}/favicon.ejs`,
inject: false,
files: {
css: [],
},
}),
new FaviconsWebpackPlugin({
logo: `${PATHS.favicon}/favicon.svg`,
devMode: 'webapp',
cache: true,
prefix: 'assets/site2/',
outputPath: 'assets/site2',
favicons: {
appName: dotenv.parsed.SYSTEM_NAME,
appDescription: dotenv.parsed.SYSTEM_NAME,
theme_color: tailwindConf.theme.colors.primary.default,
},
}),
],
};
};