-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.settings.js
36 lines (34 loc) · 973 Bytes
/
webpack.settings.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
const path = require('path')
const theme = require(path.resolve(__dirname, 'config/theme.json'))
const urls = {
live: 'http://localhost:8080/public',
local: 'http://localhost:8080/public',
critical: 'http://localhost:8080/',
}
module.exports = {
theme: theme,
publicPath: '/public/wp-content/themes/' + theme.slug + '/',
buildPath: 'dist/',
// publicPath: process.env.NODE_ENV == 'development' ? urls.local + '/dist/' : urls.live + '/dist/',
// buildPath: process.env.NODE_ENV == 'development' ? urls.local + '/dist/' : urls.live + '/dist/',
urls: urls,
criticalCssConfig: {
base: './server/wp-content/themes/' + theme.slug + '/css/',
suffix: '_critical.min.css',
criticalHeight: 1200,
criticalWidth: 1200,
ampPrefix: 'amp_',
ampCriticalHeight: 19200,
ampCriticalWidth: 600,
pages: [
{
url: '',
template: 'index'
},
{
url: '',
template: 'amp_index'
}
]
}
}