Skip to content

Commit 40b2d52

Browse files
authored
Merge pull request #2 from iamphi/patch-1
🐛 Handle config without pluginOptions defined
2 parents 22d823f + 3e30868 commit 40b2d52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var proxy = require('http-proxy-middleware');
22

33
module.exports = (api, options) => {
4-
const opts = options.pluginOptions.proxy;
4+
const opts = options.pluginOptions && options.pluginOptions.proxy;
55

66
if (opts && (opts.enabled === undefined || opts.enabled)) {
77
api.configureDevServer((app) => {

0 commit comments

Comments
 (0)