-
Notifications
You must be signed in to change notification settings - Fork 6
/
webpack.media.js
51 lines (50 loc) · 1.13 KB
/
webpack.media.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 CopyPlugin = require('copy-webpack-plugin');
const path = require('path');
module.exports = {
mode: process.env.NODE_ENV || "production",
entry: {},
output: {
path: path.resolve(__dirname),
},
module: {
rules: [
{
test: /.*/,
use: [
{loader: CopyPlugin.loader},
]
}
]
},
plugins: [
new CopyPlugin({
patterns: [
{
from: '*',
to: 'assets/images/uswds/',
context: 'node_modules/@uswds/uswds/dist/img',
},
{
from: '*',
to: 'assets/images/uswds/usa-icons/',
context: 'node_modules/@uswds/uswds/dist/img/usa-icons',
},
{
from: '*',
to: 'assets/images/uswds/usa-icons-bg/',
context: 'node_modules/@uswds/uswds/dist/img/usa-icons-bg',
},
{
from: 'sprite.svg',
to: 'assets/images/uswds/',
context: 'node_modules/@uswds/uswds/dist/img',
},
{
from: '**/*',
to: 'assets/fonts',
context: 'node_modules/@uswds/uswds/dist/fonts',
},
],
}),
],
};