-
Notifications
You must be signed in to change notification settings - Fork 53
/
webpack.config.js
56 lines (54 loc) · 2.35 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
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
const path = require( 'path' );
module.exports = {
...defaultConfig,
output: {
...defaultConfig.output,
path: path.resolve( __dirname, 'dist' ),
},
entry: {
admin: [ './src/js/admin.js' ],
'recommended-content-block': [
'./includes/Classifai/Blocks/recommended-content-block/index.js',
],
'recommended-content-block-frontend': [
'./includes/Classifai/Blocks/recommended-content-block/frontend.js',
],
'classifai-plugin-media-processing': './src/js/features/media-processing/media-upload.js',
'classifai-plugin-editor-ocr': './src/js/features/media-processing/editor-ocr.js',
'classifai-plugin-commands': './src/js/features/commands.js',
'classifai-plugin-classification': './src/js/features/classification/index.js',
'classifai-plugin-classification-previewer': './src/js/features/classification/previewer.js',
'classifai-plugin-classification-ibm-watson': './src/js/features/classification/ibm-watson.js',
'classifai-plugin-fill': './src/js/features/slot-fill/index.js',
'classifai-plugin-text-to-speech': './src/js/features/text-to-speech/index.js',
'classifai-plugin-text-to-speech-frontend': './src/js/features/text-to-speech/frontend/index.js',
'classifai-plugin-content-resizing': './src/js/features/content-resizing/index.js',
'classifai-plugin-title-generation': './src/js/features/title-generation/index.js',
'classifai-plugin-classic-title-generation': './src/js/features/title-generation/classic/index.js',
'classifai-plugin-excerpt-generation': './src/js/features/excerpt-generation/index.js',
'classifai-plugin-classic-excerpt-generation': './src/js/features/excerpt-generation/classic/index.js',
'classifai-plugin-inserter-media-category': './src/js/features/image-generation/inserter-media-category.js',
'classifai-plugin-image-generation-media-modal': [
'./src/js/features/image-generation/media-modal/index.js',
'./src/js/features/image-generation/extend-image-block-generate-image.js'
],
'classifai-plugin-image-generation-generate-image-media-upload': './src/js/features/image-generation/media-modal/views/generate-image-media-upload.js',
},
module: {
rules: [
...defaultConfig.module.rules,
{
test: /\.svg$/,
use: [
{
loader: 'svg-react-loader',
},
],
},
],
},
externals: {
react: 'React',
},
};