-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.init.js
61 lines (60 loc) · 2.45 KB
/
webpack.config.init.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
52
53
54
55
56
57
58
59
60
61
const { merge } = require('webpack-merge');
const path = require("path");
const webpackConfig = require('./webpack.config');
const CopyPlugin = require("copy-webpack-plugin");
module.exports = merge(webpackConfig, {
mode: 'development',
devtool: false,
plugins: [
new CopyPlugin({
patterns: [
{
from: path.resolve(__dirname, "node_modules/@popperjs/core/dist/umd/popper.js"),
to: path.resolve(__dirname, "js/popperjs"),
context: "node_modules/@popperjs/core/dist/",
},
{
from: path.resolve(__dirname, "node_modules/bootstrap/js/dist/*.js"),
to: path.resolve(__dirname, "js/bootstrap"),
context: "node_modules/bootstrap/js/dist/",
},
{
from: path.resolve(__dirname, "node_modules/bootstrap/js/dist/dom/*.js"),
to: path.resolve(__dirname, "js/bootstrap/dom"),
context: "node_modules/bootstrap/js/dist/dom",
},
{
from: path.resolve(__dirname, "node_modules/bootstrap/js/dist/util/*.js"),
to: path.resolve(__dirname, "js/bootstrap/util"),
context: "node_modules/bootstrap/js/dist/util",
},
// Uncomment to use the fontawesome library.
// {
// from: path.resolve(__dirname, "node_modules/@fortawesome/fontawesome-free/css/all.min.css"),
// to: path.resolve(__dirname, "fonts/fontawesome-free/css"),
// context: "node_modules/@fortawesome/fontawesome-free/css",
// },
// {
// from: path.resolve(__dirname, "node_modules/@fortawesome/fontawesome-free/webfonts/*"),
// to: path.resolve(__dirname, "fonts/fontawesome-free/webfonts"),
// context: "node_modules/@fortawesome/fontawesome-free/webfonts",
// },
{
from: path.resolve(__dirname, "node_modules/bootstrap-icons/font/*"),
to: path.resolve(__dirname, "fonts/bootstrap-icons/font/"),
context: "node_modules/bootstrap-icons/font",
},
{
from: path.resolve(__dirname, "node_modules/bootstrap-icons/font/fonts/*"),
to: path.resolve(__dirname, "fonts/bootstrap-icons/font/fonts"),
context: "node_modules/bootstrap-icons/font/fonts",
},
{
from: path.resolve(__dirname, "node_modules/bootstrap-icons/icons/*"),
to: path.resolve(__dirname, "images/icons"),
context: "node_modules/bootstrap-icons/icons",
}
],
}),
],
});