Repository: react-static/react-static

Issue #1220: [Bug] v7.1.0 Browserlist warning in dev environment
Created: 2019-06-10T17:12:52Z
After updating to react-static v7.1.0, the warning below is displayed in the terminal when the dev server is starting. It doesn't appear to cause any issues so far, but it's worth mentioning.
[✓] Templates Built
Bundling Application...
Fetching Site Data...
[✓] Site Data Downloaded (0.1s)

  Replace Autoprefixer browsers option to Browserslist config.
  Use browserslist key in package.json or .browserslistrc file.

  Using browsers option cause some error. Browserslist config
  can be used for Babel, Autoprefixer, postcss-normalize and other tools.

  If you really need to use option, rename it to overrideBrowserslist.

  Learn more at:
  https://github.com/browserslist/browserslist#readme
  https://twitter.com/browserslist



  Replace Autoprefixer browsers option to Browserslist config.
  Use browserslist key in package.json or .browserslistrc file.

  Using browsers option cause some error. Browserslist config
  can be used for Babel, Autoprefixer, postcss-normalize and other tools.

  If you really need to use option, rename it to overrideBrowserslist.

  Learn more at:
  https://github.com/browserslist/browserslist#readme
  https://twitter.com/browserslist



  Replace Autoprefixer browsers option to Browserslist config.
  Use browserslist key in package.json or .browserslistrc file.

  Using browsers option cause some error. Browserslist config
  can be used for Babel, Autoprefixer, postcss-normalize and other tools.

  If you really need to use option, rename it to overrideBrowserslist.

  Learn more at:
  https://github.com/browserslist/browserslist#readme
  https://twitter.com/browserslist


[✓] Application Bundled (20.5s)

Duplicate issue #1239: [Bug] In V7, react-static-plugin-sass plugin builds with noisy warnings: "Replace Autoprefixer browsers option to Browserslist config...."
Created: 2019-06-25T00:18:56Z
Bug:
Since upgrading react-static to V7, the react-static-plugin-sass plugin leaves very noisy warnings when it builds.
The warnings repeat multiple times (one time per each scss import maybe?). It reads:

Replace Autoprefixer browsers option to Browserslist config.
Use browserslist key in package.json or .browserslistrc file.
Using browsers option cause some error. Browserslist config
can be used for Babel, Autoprefixer, postcss-normalize and other tools.
If you really need to use option, rename it to overrideBrowserslist.
Learn more at:
https://github.com/browserslist/browserslist#readme
https://twitter.com/browserslist


The warning refers to a browserslist readme which suggests to add the following to the package.json:
  "browserslist": [
    "defaults"
  ]

But this does not seem to help.  Perhaps, the autoprefix settings need to adjusted in a webpack settings file like this?
Environment
Using react-static: 7.0.0 and
Using react-static-plugin-sass: 7.1.0
[Bug] In V7, react-static-plugin-sass plugin builds with noisy warnings: "Replace Autoprefixer browsers option to Browserslist config...."
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 491.36 MB / 16.00 GB
Shell: 5.4.2 - /usr/local/bin/zsh
Binaries:
Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.15.0/bin/npm
Browsers:
Chrome: 75.0.3770.100
Chrome Canary: 77.0.3832.0
Firefox: 65.0.1
Safari: 12.1.1
npmPackages:
react: ^16.8.2 => 16.8.6
react-dom: ^16.8.2 => 16.8.6
react-static: ^7.0.0 => 7.1.0
react-static-plugin-reach-router: ^7.0.0 => 7.0.0
react-static-plugin-sass: ^7.1.0 => 7.1.0
react-static-plugin-sitemap: ^7.0.0 => 7.0.0
react-static-plugin-source-filesystem: ^7.0.0 => 7.0.0
Steps to Reproduce the problem

Use a freshly installed react-static template.
Install react-static-plugin-sass
Add "react-static-plugin-sass" to the plugins section of the static.config.js file.
Run yarn start or yarn build.
The app does work, but the console is filled with noisy warnings.

Reproducible Demo
You can refer to this test repo here:
https://github.com/erchaves/react-static-template
Thanks
Thanks for the great project!
-Eric
Syllablehq.com

Closing comment (2019-06-25T10:44:42Z): duplicate of #1220