Skip to content

Running build configuration from parent folder? #919

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

Closed
chuckdries opened this issue Sep 12, 2017 · 2 comments
Closed

Running build configuration from parent folder? #919

chuckdries opened this issue Sep 12, 2017 · 2 comments

Comments

@chuckdries
Copy link

chuckdries commented Sep 12, 2017

I'm working on a project where client and server live in the same git repo, (would like to) use the same package.json, etc. I read the documentation on the subject, which didn't mention calling the dev server from the parent of the folder it all lives in.

For example:
node client/build/dev-server.js

I've spent a few hours mucking around with paths and whatnot and I've settled in just throwing a cd into the package.json scripts for now, but eventually I want to use concurrently to run the server and client together, and I can't do that in that case.

The pain points:

  • Can't manually specify location of /source,
  • Have to go through and change relative directory of dev-client.js in webpack.dev.conf.js
  • Have to manually change webpack entry and aliases
  • After all this, and hacing changed every path I could find, the production build succeeds but the dev server fails, with an empty error no less! It's just blank.
@LinusBorg
Copy link
Contributor

I think this can be impropved upon, primarily by setting the context option and converting a couple of paths to absolute ones.

We should look at this after #975 has been merged - using the official webpack-dev-server might solve some of the issues you were having.

@LinusBorg
Copy link
Contributor

Context is now set properly.

https://github.com/vuejs-templates/webpack/blob/develop/template/build/webpack.base.conf.js#L23

I hope this resolves this issue..

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

No branches or pull requests

2 participants