-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
executable file
·39 lines (35 loc) · 1.12 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
const path = require( 'path' )
const BrowserSyncPlugin = require( 'browser-sync-webpack-plugin' )
// Import the @wordpress/scripts config.
const wordpressConfig = require( '@wordpress/scripts/config/webpack.config' )
// See svgo.config.js to configure SVG manipulation.
module.exports = {
// Spread the WordPress config.
...wordpressConfig,
entry: {
// @wordpress/scripts helper which generates entry points from any '**/block.json' in 'src'.
...wordpressConfig.entry(),
// Extend with new entrypoints.
'js/bigup-reviews-editor': path.join( __dirname, '/src/bigup-reviews-editor.js' ),
},
plugins: [
// Spread the WordPress plugins.
...wordpressConfig.plugins,
new BrowserSyncPlugin( {
proxy: 'localhost:6969', // Live WordPress site. Using IP breaks it.
ui: { port: 3001 }, // BrowserSync UI.
port: 3000, // Dev port on localhost.
logLevel: 'debug',
reload: false, // false = webpack handles reloads (not sure if this works with files option).
browser: "google-chrome-stable",
files: [
'src/**',
'classes/**',
'patterns/**',
'parts/**',
'templates/**',
'**/**.json'
]
} )
]
}