forked from pressidium/pressidium-cookie-consent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
26 lines (25 loc) · 954 Bytes
/
webpack.config.js
File metadata and controls
26 lines (25 loc) · 954 Bytes
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
const path = require('path');
const defaults = require('@wordpress/scripts/config/webpack.config');
module.exports = {
...defaults,
entry: {
'bundle.admin': path.resolve(process.cwd(), 'src', 'admin', 'index.js'),
'bundle.client': path.resolve(process.cwd(), 'src', 'client', 'index.js'),
'bundle.feedback': path.resolve(process.cwd(), 'src', 'feedback', 'index.js'),
'block-scripts': path.resolve(process.cwd(), 'src', 'client', 'block-scripts.js'),
'consent-mode': path.resolve(process.cwd(), 'src', 'client', 'consent-mode.js'),
'cookies-block': path.resolve(process.cwd(), 'src', 'blocks', 'cookies', 'index.js'),
},
output: {
filename: '[name].js',
path: path.resolve(process.cwd(), 'public'),
},
externals: {
react: 'React',
'react-dom': 'ReactDOM',
},
resolve: {
...defaults.resolve,
extensions: [...(defaults.resolve ? defaults.resolve.extensions || ['.js', 'jsx'] : [])],
},
};