Closed
Description
- Operating System: Arch Linux
- Node Version: 10.16.3
- NPM Version: 6.9.0
- webpack Version: 4.41.2
- webpack-dev-server Version: 3.9.0
- Browser: Chrome 78
- This is a bug
- This is a modification request
Code
// relevant part of the config
const config = {
webpack: {
publicPath: '/wp-content/themes/doge/dist/',
serverAddress: 'doge.local',
wordpressUR: 'https://doge.local',
}
}
const { webpack } = config
const devServerPlugin = (opts = {}) => {
const isWin = /^win/.test(process.platform)
const isMac = /^darwin/.test(process.platform)
// Override publicPath
const publicPath = (isHTTPS ? 'https' : 'http') + `://${host}:${port}${webpack.publicPath}`
return merge({
devServer: {
host,
port,
https: isHTTPS,
stats: 'errors-only',
overlay: {
errors: true,
warnings: false,
},
watchOptions: {
poll: isWin || isMac ? undefined : 1000,
aggregateTimeout: 300,
},
open: process.env.OPEN !== 'false',
hotOnly: true,
clientLogLevel: 'none',
publicPath,
proxy: {
'/': {
target: webpack.wordpressURL,
changeOrigin: true,
autoRewrite: true,
secure: false,
headers: {
'X-Proxy': 'webpack-dev-server',
},
},
},
// Allow access to WDS data from anywhere, including the standard non-proxied WP
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
},
},
plugins: [
new WriteFile({
test: /^(?!.*(hot)).*/,
}),
new HotModuleReplacement(),
],
output: {
publicPath,
},
})
}
Expected Behavior
Not this.
Actual Behavior
Can't access the development site because the browser doesn't let me. Downgrading to 3.8.2 fixes the issue.
"... the website sent scrambled credentials that Google Chrome cannot process. Network errors and attacks are usually temporary, so this page will probably work later."
For Bugs; How can we reproduce the behavior?
Install 3.9 on Linux and use a chromium browser.
Metadata
Metadata
Assignees
Labels
No labels