epicodus-lessons/week-6-js-api-call-with-webpack

Week 6: OpenWeather API --mode

Closed this issue · 2 comments

Issue: Mis-match mode declaration in package.json "scripts"
Location: Week 6 OpenWeather API package.json

Fix

  "scripts": {
    "build": "webpack --mode=development",
    "start": "npm run build; webpack-dev-server --open --mode=development",
    "lint": "eslint src/*.js",
    "test": "jest --coverage"
  }

Is currently "start": "npm run build; webpack-dev-server --open --mode development"
--mode needs to have matching declarations in order to function as expected.
--mode=development or --mode development

Note
Students reported that --mode=development works for Windows, and --mode development works for Mac. I haven't been able to test it, but I suspect it doesn't matter so long as they match.

They both work fine for Mac - is anyone actually having problems with the scripts here? While having them both the same would be a bit more consistent, it would involve rebuilding the entire project from scratch and changing all the links in LHTP.

I created a branch for each reference we offer students and fixed this issue in each branch