10BC0 Only provide baseUrl fix if baseUrl provided by morrislaptop · Pull Request #1421 · vuejs/vue-cli · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@morrislaptop
Copy link
Contributor

In my scenario, the page is being served by PHP and the URL to the bundle is pointed directly to the webpack dev server.

So, the website is being served at http://my-project.test and the script is pointing to http://localhost:8080/app.js.

By specifying ?/sockjs-node when including the webpack dev server client, it is forcing the sockjs server to be on the same domain as the page. Because of https://github.com/webpack/webpack-dev-server/blob/ab4eeb007283fdf3e8950ff1f3ff8150a4812061/client-src/default/index.js#L30

I need the __resourceQuery to be empty so that it gets the URL for the sockjs server from the getCurrentScriptSource

This PR shouldn't break for anyone already using baseUrl.

Or if there is another way to achieve what I need, please let me know!

Also required by #1390 which I am working on!

@yyx990803 yyx990803 merged commit af1151a into vuejs:dev May 31, 2018
@morrislaptop morrislaptop deleted the only-pass-path-if-baseurl-is-set branch May 31, 2018 18:19
@lbjones
B7DB Copy link
lbjones commented Jun 2, 2018

Dang it, this broke my solution over here #869 (comment)

@lbjones
Copy link
lbjones commented Jun 2, 2018

Can you explain how to use the valet driver? I'm getting errors when I try:

08:29:41 ltrain at in ~/www/vue
$ valet which
PHP Warning:  preg_match(): Compilation failed: nothing to repeat at offset 0 in ~/.valet/Drivers/WebpackDevServerBaseDriver.php on line 107

Warning: preg_match(): Compilation failed: nothing to repeat at offset 0 in ~/.valet/Drivers/WebpackDevServerBaseDriver.php on line 107
This site is served by [BasicValetDriver].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0