question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When vue.config.js set devServer.open to true it will open twice.

See original GitHub issue

Version

3.8.2

Environment info

Environment Info:

  System:
    OS: Windows 10
    CPU: (16) x64 AMD Ryzen 7 2700X Eight-Core Processor
  Binaries:
    Node: 10.15.3 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.16.0 - C:\Users\lanseria\AppData\Roaming\npm\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.0.0
    @vue/babel-preset-app:  3.8.0
    @vue/babel-preset-jsx:  1.0.0
    @vue/babel-sugar-functional-vue:  1.0.0
    @vue/babel-sugar-inject-h:  1.0.0
    @vue/babel-sugar-v-model:  1.0.0
    @vue/babel-sugar-v-on:  1.0.0
    @vue/cli-overlay:  3.8.0
    @vue/cli-plugin-babel: ^3.8.0 => 3.8.0
    @vue/cli-plugin-eslint: ^3.8.0 => 3.8.0
    @vue/cli-service: ^3.8.0 => 3.8.0
    @vue/cli-shared-utils:  3.8.0
    @vue/component-compiler-utils:  2.6.0
    @vue/preload-webpack-plugin:  1.1.0
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^5.0.0 => 5.2.2 (4.7.1)
    vue: ^2.6.10 => 2.6.10
    vue-eslint-parser:  5.0.0 (2.0.3)
    vue-hot-reload-api:  2.3.3
    vue-loader:  15.7.0
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

vue create test // create vue.config.js and sets devServer.host to '‘0.0.0.0’ and sets devServer.open: true, Then yarn serve // url: http://0.0.0.0:8080 quickly opened but unused When compiled, url: http://localhost:8080/ opened

What is expected?

At least not pop up twice

What is actually happening?

Pop up twice, and the first time there is no response, the second IP address does not apply

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sodateacommented, May 30, 2019

Previously open option for webpack-dev-server only works with its own CLI. https://github.com/webpack/webpack-dev-server/pull/1863 Now it also respects this flag passed via its Node API.

1reaction
xovelcommented, May 30, 2019

The bug is not in open or opn package, but in webpack-dev-server. May it not a bug, just a strategy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration Reference | Vue CLI
When devServer.proxy is set to a string, only XHR requests will be proxied. If you want to test an API URL, don't open...
Read more >
Why is my vue.config.js file not working? - Stack Overflow
The vue.config.js file is only used when using the vue-cli-service . If you are using Vue CLI 3 or higher, it should create...
Read more >
Configuring quasar.config.js
When you set devServer > https: true in your quasar.config.js file, Quasar will auto-generate a SSL certificate for you. However, if you want...
Read more >
How to create a Vue.js app using Single-File Components ...
We do this by setting open to true which is also inside the devServer option. const HtmlWebpackPlugin = require('html-webpack-plugin') ...
Read more >
Hot Module Replacement - webpack
js API. When using Webpack Dev Server with the Node.js API, don't put the dev server options on the webpack configuration object.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found