fixed-data-table-2 icon indicating copy to clipboard operation
fixed-data-table-2 copied to clipboard

`isDev` in webpack.config.js always truthy

Open prohazko2 opened this issue 4 years ago • 3 comments

Hi, noticed some kind of bug in webpack.config file https://github.com/schrodinger/fixed-data-table-2/blob/master/webpack.config.js#L9

var isDev = JSON.stringify(process.env.NODE_ENV !== 'production');

isDev always evaluates to truthy string value after json stringification, so webpack always works in development mode, even for build-dist npm script here https://github.com/schrodinger/fixed-data-table-2/blob/master/webpack.config.js#L62

Maybe something like

mode: isDev === 'true' ? 'development' : 'production',

would be better?

prohazko2 avatar May 13 '20 21:05 prohazko2

Good catch. Could you put up a PR?

And could you also check if we need the same fix in these config files as well?:

  • https://github.com/schrodinger/fixed-data-table-2/blob/master/webpack.config-test.js
  • https://github.com/schrodinger/fixed-data-table-2/blob/master/site/webpack-prerender.config.js
  • https://github.com/schrodinger/fixed-data-table-2/blob/master/site/webpack-client.config.js

pradeepnschrodinger avatar May 14 '20 07:05 pradeepnschrodinger

Yeah, sure. Give me couple days

prohazko2 avatar May 14 '20 11:05 prohazko2

Since there hasn't been anything new here, I'm going to tag it for the backlog since we're considering redo-ing the build system before too long.

wcjordan avatar Jul 01 '20 19:07 wcjordan