-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathwebpack.config.js
62 lines (61 loc) · 1.7 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
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
const path = require( 'path' );
module.exports = {
...defaultConfig,
output: {
...defaultConfig.output,
path: path.resolve( __dirname, 'dist' ),
},
entry: {
editor: [ './src/js/editor.js' ],
'editor-ocr': [ './src/js/editor-ocr.js' ],
media: [ './src/js/media.js' ],
admin: [ './src/js/admin.js' ],
'language-processing': [ './src/js/language-processing.js' ],
'gutenberg-plugin': [ './src/js/gutenberg-plugin.js' ],
'post-audio-controls': [ './src/js/post-audio-controls.js' ],
'post-status-info': [
'./src/js/gutenberg-plugins/post-status-info.js',
],
'content-resizing-plugin': [
'./src/js/gutenberg-plugins/content-resizing-plugin.js',
],
'recommended-content-block': [
'./includes/Classifai/Blocks/recommended-content-block/index.js',
],
'recommended-content-block-frontend': [
'./includes/Classifai/Blocks/recommended-content-block/frontend.js',
],
'post-excerpt': [ './src/js/post-excerpt/index.js' ],
'media-modal': [ './src/js/media-modal/index.js' ],
'inserter-media-category': [
'./src/js/gutenberg-plugins/inserter-media-category.js',
],
'generate-excerpt-classic': [
'./src/js/openai/classic-editor-excerpt-generator.js',
],
'generate-title-classic': [
'./src/js/openai/classic-editor-title-generator.js',
],
commands: [ './src/js/gutenberg-plugins/commands.js' ],
'generate-image-media-upload': [
'./src/js/media-modal/views/generate-image-media-upload.js',
],
},
module: {
rules: [
...defaultConfig.module.rules,
{
test: /\.svg$/,
use: [
{
loader: 'svg-react-loader',
},
],
},
],
},
externals: {
react: 'React',
},
};