Skip to content

V2 -- Centralize defaultPort setting #68

Description

@sthzg

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).

Activity

  1. weblogixx commented on Sep 5, 2016

    @weblogixx
    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.

  2. sthzg commented on Sep 23, 2016

    @sthzg
    MemberAuthor

    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?

  3. weblogixx commented on Sep 27, 2016

    @weblogixx
    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".

  4. sthzg commented on Sep 28, 2016

    @sthzg
    MemberAuthor

    @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?

  5. sthzg commented on Oct 5, 2016

    @sthzg
    MemberAuthor

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions