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

V2 -- Centralize defaultPort setting #68

Open
sthzg opened this issue Sep 3, 2016 · 5 comments
Open

V2 -- Centralize defaultPort setting #68

sthzg opened this issue Sep 3, 2016 · 5 comments

Comments

@sthzg
Copy link
Member

sthzg commented Sep 3, 2016

The port for the dev server reflects in two places:

This value should be populated from a single setting and additionally be overridable from outside through an env var (e.g. for spinning up a dev server on a separate port wo/ needing to modify the config file that is under VC).

@weblogixx
Copy link
Member

@sthzg, you are right about this. We had a setting (at least) in the old template, so one could set it in a single file. This went overboard when I was updating the config (regression).

Maybe we could set it via cross-env, it is already included in the new setup. You could do something like ./node_modules/.bin/cross-env WEBPACK_PORT=80 npm start to inject the port variable.

Will have a look at it.

@sthzg
Copy link
Member Author

sthzg commented Sep 23, 2016

hi @weblogixx, are you already working on this or is it okay for you if I draft this feature using cross-env and push a PR to review into this ticket?

@weblogixx
Copy link
Member

@sthzg, I will start working on the generator on this weekend. Maybe I could include this while fixing a problem that occured with the current webpack beta. In case you have not yet run into it: webpack/webpack#3018. This will need adjusting on our side, as npm update will break the config because of the new validation "feature".

@sthzg
Copy link
Member Author

sthzg commented Sep 28, 2016

@weblogixx interesting. I haven't experienced it yet, but I know someone who knows someone who's bug now starts making sense to me 😄. Do you think we should start pinning a specific version of Webpack as long as it is in beta?

@sthzg
Copy link
Member Author

sthzg commented Oct 5, 2016

@weblogixx I got that now. FWIW here are some steps I took to update my config. At least the setup runs again and the tests pass. 🚣

  • remove debug: false from Base.js
  • remove the empty string ['', ...] from the resolve.extensions array in Base.js
  • refactor module.loaders and module.preLoaders to the newly preferred rules array and the enforce: 'pre' for the former pre loader entry.
{
  module: {
    rules: [{
      enforce: 'pre',
      test: /\.(js|jsx)$/,
      include: this.srcPathAbsolute,
      loader: 'eslint'
    },
    // ... everything from loaders
  ]}
}

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

2 participants