执行npm run dev 命令后,会给一个URL:http://localhost:8081/,而不是自动打开默认浏览器。
执行npm run dev 命令后,会给一个URL:http://localhost:8081/,而不是自动打开默认浏览器。
New /config/index.js options (#975)
dev:
autoOpenBrowser: Wether to open a new browser tab whenever the dev server starts.
useEslint: Wether to use eslint-loader in webpack. Some people might only want to use eslint in their IDE, so the loader can be deactivated here.
showEslintErrorsInOverlay: if using eslint-loader, this option allows to switch of the eslint errors in the error overlay shown in the browser. the errors still appear in the console & terminal, but don't break the workflow in the browser anymore.
notifyOnErrors: will show OS notifications whenever a build fails. Useful when your builds take some time
poll: enables polling mode for webpack's file-change watcher. The default mode doesn't work in some environments, like dropbox folders, Vagrant etc. so switching to polling can fix this.
you can now change sourcemap-related options for the dev and prod builds in the config file.
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
2 回答4.7k 阅读✓ 已解决
4 回答4.3k 阅读✓ 已解决
config/index.js中,把autoOpenBrowser改成true,就能自动打浏览器了,亲测可用。
