When vue.config.js set devServer.open to true it will open twice.
See original GitHub issueVersion
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:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Previously
open
option forwebpack-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.The bug is not in
open
oropn
package, but inwebpack-dev-server
. May it not a bug, just a strategy.