Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content not from webpack is served #158

Open
Kerrialn opened this issue Dec 13, 2021 · 1 comment
Open

Content not from webpack is served #158

Kerrialn opened this issue Dec 13, 2021 · 1 comment

Comments

@Kerrialn
Copy link

Kerrialn commented Dec 13, 2021

Stack:

Package version
Vue.js 2.6.14
Symfony 5.3
api platform 2.6
web pack encore 1.0.0

I have a full API and I run it locally like so symfony server:start and yarn dev-server however, it seems that by default both run on port 8000. which introduces conflicts when it comes to routing.

If possible, how can I change the port for the encore server?

I attempted to run yarn dev-server --port 8080 but it seems that it still ran on 8000.

@Kerrialn Kerrialn changed the title How to define a different port? How to define a different port for encore webpack? Dec 13, 2021
@Kerrialn
Copy link
Author

just as an update I managed to run the apps on two separate ports by running encore dev-server --port 8080

the output doesn't look right to me:

➜  app:(master) ✗ encore dev-server --port 8080
Running webpack-dev-server ...

<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/, http://127.0.0.1:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/.../public' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'

However, when I check http://localhost:8080/ I get 404 not found error.
I'm assuming this is because the Vue app on port 8080 isn't configured correctly to serve the correct files. as stated in the dev-server output "Content not from webpack is served".

How can I resolve this?

@Kerrialn Kerrialn changed the title How to define a different port for encore webpack? Content not from webpack is served Dec 29, 2021
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

No branches or pull requests

1 participant