-
Notifications
You must be signed in to change notification settings - Fork 30
/
webpack.config.js
63 lines (62 loc) · 1.39 KB
/
webpack.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
52
53
54
55
56
57
58
59
60
61
62
63
const defaultConfig = require('@wordpress/scripts/config/webpack.config');
const CopyPlugin = require('copy-webpack-plugin');
const path = require('path');
module.exports = {
...defaultConfig,
output: {
...defaultConfig.output,
path: path.resolve(process.cwd(), 'dist'),
},
entry: {
blocks: path.resolve(process.cwd(), 'assets/js', 'blocks.js'),
'podcasting-edit-post': path.resolve(
process.cwd(),
'assets/js',
'podcasting-edit-post.js'
),
'podcasting-edit-term': path.resolve(
process.cwd(),
'assets/js',
'podcasting-edit-term.js'
),
'podcast-platforms-block': path.resolve(
process.cwd(),
'assets/js/blocks/podcast-platforms',
'index.js'
),
'podcasting-onboarding': path.resolve(
process.cwd(),
'assets/js',
'onboarding.js'
),
'podcasting-transcript': path.resolve(
process.cwd(),
'includes/blocks/podcast-transcript',
'index.js'
),
'create-podcast-show': path.resolve(
process.cwd(),
'assets/js',
'create-podcast-show.js'
),
'latest-episode': path.resolve(
process.cwd(),
'assets/js/blocks/latest-episode',
'index.js'
),
'podcast': path.resolve(
process.cwd(),
'assets/js/blocks/podcast',
'index.js'
),
},
plugins: [
...defaultConfig.plugins,
new CopyPlugin({
patterns: [
{ from: 'assets/images/*', to: './' },
{ from: 'assets/images/icons', to: './images/icons' },
],
}),
],
};